as: RX-Modifiers
1
1 9.39.2 Symbolic Operand Modifiers
1 ---------------------------------
1
1 The assembler supports one modifier when using symbol addresses in RX
1 instruction operands. The general syntax is the following:
1
1 %gp(symbol)
1
1 The modifier returns the offset from the __GP symbol to the specified
1 symbol as a 16-bit value. The intent is that this offset should be used
1 in a register+offset move instruction when generating references to
1 small data. Ie, like this:
1
1 mov.W %gp(_foo)[%gpreg], r1
1
1 The assembler also supports two meta register names which can be used
1 to refer to registers whose values may not be known to the programmer.
1 These meta register names are:
1
1 '%gpreg'
1 The small data address register.
1
1 '%pidreg'
1 The PID base address register.
1
1 Both registers normally have the value r13, but this can change if
1 some registers have been reserved for use by interrupt handlers or if
1 both the small data limit and position independent data features are
1 being used at the same time.
1