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

Treats the specified register names as fixed registers, and prevents the compiler from generating code that uses these registers.

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.

Syntax

--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.

Restrictions

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

Examples

--global_reg=1,4,5
Reserves registers r4, r7 and r8
Related reference
9.7 __global_reg
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.