Program Registers - Renesas NU85E Preliminary User's Manual

32-bit microprocessor core
Table of Contents

Advertisement

3.2.1 Program registers

The program registers include the general-purpose registers (r0 to r31) and the program counter (PC).
Program Register
Name
General-purpose
r0
register
r1
r2
r3
r4
r5
r6 to r29
r30
r31
Program counter
PC
Remark For detailed explanations of r1, r3 to r5, and r31, which are used by the assembler or C compiler, refer
to the C Compiler Package (CA850) User's Manual.
(1) General-purpose registers
The 32 registers r0 to r31 are provided as general-purpose registers. All of these registers can be used for data
variables or address variables.
However, take note of the following points when using the r0 to r5, r30, and r31 registers.
(a) r0, r30
These registers are implicitly used by instructions.
r0, which is a register that always holds 0, is used by operations that use 0, or in 0-offset addressing.
r30 is used as a base pointer when accessing memory by the SLD and SST instructions.
(b) r1, r3 to r5, r31
These registers are implicitly used by the assembler and C compiler.
The contents of these registers must be saved before they are used so that the contents are not destroyed,
and the original contents must be returned after use.
(c) r2
This register may be used by the real-time OS.
When not being used by the real-time OS, r2 can be used as an address variable or data variable register.
CHAPTER 3 CPU
Table 3-1. List of Program Registers
Zero register (always holds zero)
Assembler-reserved register (used as a working register for address generation)
Address/data variable register (when this register is not used by the real-time OS)
Stack pointer (used to generate a stack frame when a function is called)
Global pointer (used to access a global variable of the data area)
Text pointer (used as the register indicating the beginning of the text area (area for locating
program code))
Registers for address/data variables
Element pointer (used as the base pointer for address generation when accessing memory)
Link pointer (used when the compiler calls a function)
Holds instruction address during program execution
Preliminary User's Manual A14874EJ3V0UM
Function
53

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nu85ea

Table of Contents