--global_reg=reg_name[,reg_name,...]

This option treats the specified register names as fixed registers, and prevents the compiler from using them in the code that is generated.

Note

Try to avoid using this option, because it restricts the compiler in terms of register allocation and can potentially give a negative effect on code generation and performance.

Show/hideSyntax

--global_reg=reg_name[,reg_name,...]

Where reg_name is the AAPCS name of the register, denoted by an integer value in the range 1 to 8.

Register names 1 to 8 map sequentially onto registers r4 to r11.

If reg_name is unspecified, the compiler faults use of --global_reg.

Show/hideRestrictions

This option has the same restrictions as the __global_reg storage class specifier.

Show/hideExample

--global_reg=1,4,5 // reserve registers r4, r7 and r8 respectively

Show/hideSee also

  • __global_reg

  • ARM Software Development Toolkit Reference Guide.

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0491F
Non-ConfidentialID091611