Reference Guide
24 Chapter 2
Program Structure
Registers and Register Mnemonics
In addition, on PA-RISC 1.1, 2.0. and 2.0W the left and right halves of
the floating-point registers can be accessed as separate single-precision
registers by using an L or R suffix.
For example, %fr8R accesses the right-most 32 bits of %fr8 as a
single-precision number.
The L or R suffixes can only be used on the predefined floating-point
registers in the form %frnn, where nn is the register number. It is not
legal to use L or R with an integer value. For example, %fr8R is legal; 8R
is not legal.
The space registers form the basis of the virtual memory system. Each of
the eight space registers can hold a 16- or 32-bit space identifier,
depending on the hardware model. The space registers are denoted as
%sr0 through %sr7. Space register %sr0 is set implicitly by the BLE
instruction, and space registers %sr5 through %sr7 cannot be modified
except by code running at the most privileged level.
The control registers contain system-state information. There are 25
control registers, denoted as %cr0 and %cr8 through %cr31. Of these
registers, only %cr11 (%sar), the shift amount register, and %cr16
(%itmt), the interval timer, are normally accessible to the user-level
programmer. The other registers are accessed only by code running at
the most privileged level.
Register operands are denoted by register-typed constants because the
Assembler needs to be able to differentiate between general registers,
space registers, floating point registers, and ordinary integer constants.
To make assembly code more readable, you can use the .REG directive to
declare a symbolic name as an alias for a predefined register. The
predefined registers have a register type associated with them. The
Assembler enforces register type checking and issues a warning message
if the wrong kind of register is used within an operand. A warning is also
issued when an integer constant or absolute expression is found where a
register is expected. You must use the .REG directive to define symbolic
register names. If a symbolic name defined in an .EQU directive is used
where a register symbol is expected, the Assembler issues a warning
message, because it considers an .EQU defined symbol to be a simple
integer constant.
NOTE If an absolute expression is used instead of a register or register-typed
symbol name, the Assembler issues warning message number 41.