Reference Guide
Chapter 2 31
Program Structure
Expressions
base register, needs only 11 bits for the remainder of the address. The
Assembler provides special operators, called field selectors, that extract
the appropriate bits from the result of an expression. With the field
selectors L' and R', the previous example can be recoded as follows:
LDIL L'START,%r1 ;put left part into r1
LDW R'START(%r1),%r2 ;add r1 and right part
The field selectors are always applied to the final result of the
expression. They cannot be used in the interior of an expression.
“Available Field Selectors” on page 31 shows all the available field
selectors and their meanings.
Table 2-11 Available Field Selectors
Field
Selector
Meaning
F' or F% Full 32 bits (default).
L' or L% Right-justified, high-order 21 bits.
R' or R% Low-order 11 bits.
LS' or
LS%
High-order 21 bits after rounding to nearest multiple of
2048.
RS' or
RS%
Low-order 11 bits, sign extended.
LD' or
LD%
Right-justified, high-order 21 bits after rounding to next
multiple of 2048.
RD' or
RD%
Low-order 11 bits, with negative sign.
LR' or
LR%
L% value with constant rounded to nearest multiple of
8192.
RR' or
RR%
R% value with constant rounded to nearest multiple of
8192, plus the difference of the constant and the rounded
constant.
T' or T% F% value offset of data linkage table slots from linkage
table pointer. In 32-bit mode, the linkage table pointer is
%r19. In 64-bit mode, the linkage table pointer is %r27.