Stack Convention
R
•Certain registers are used as dedicated registers and programmers are not expected to use them for any other purpose.
♦Registers R14 through R17 are used for storing the return address from interrupts,
♦Small data area pointers are used for accessing certain memory locations with 16 bit immediate value. These areas are discussed in the memory model section of this document. The read only small data area (SDA) anchor R2
♦Register R1 stores the value of the stack pointer and is updated on entry and exit from functions.
♦Register R18 is used as a temporary register for assembler operations.
•MicroBlaze includes special purpose registers such as: program counter (rpc), machine status register (rmsr), exception status register (resr), exception address register (rear), and floating point status register (rfsr). These registers are not mapped directly to the register file and hence the usage of these registers is different from the general purpose registers. The value of a special purpose registers can be transferred to a general purpose register by using mts and mfs instructions (For more details refer to the “MicroBlaze Application Binary Interface” chapter).
Stack Convention
The stack conventions used by MicroBlaze are detailed in Figure
The shaded area in Figure
MicroBlaze Processor Reference Guide | www.xilinx.com | 67 |
UG081 (v6.0) June 1, 2006 |
|