C only


Indicates that the given list of registers cannot be used during the compilation except as a stack pointer, frame pointer or in some other fixed role. You should use this option in modules that are required to work with other modules that use global register variables or hand written assembler code.


Read syntax diagramSkip visual syntax diagram                         .-:-------------.
                         V               |
>>- -q--reserved_reg--=----register_list-+---------------------><


You must use valid register names on the target platform; otherwise the compiler issues a warning message. Duplicate register names are ignored silently.

-qreserved_reg is cumulative, for example, specifying -qreserved_reg=r14 and -qreserved_reg=r15 is equivalent to specifying -qreserved_reg=r14:r15. The valid register names are as follows:


xlc myprogram.c -qreserved_reg=r3:r4 

indicates that r3 and r4 cannot be used in the generated code other than in their fixed role to pass parameters to a function and receive the return value.

Related information