General Purpose Registers (R0 To R31) - NEC V850ES/F 3-L Series User Manual

32-bit single-chip microcontroller
Table of Contents

Advertisement

Chapter 3

3.2.1 General purpose registers (r0 to r31)

Table 3-2
Caution
138
Each of the 32 general purpose registers can be used as a data variable or
address variable.
However, the registers r0, r1, r3 to r5, r30, and r31 may implicitly be used by
the assembler/compiler (see table Table 3-2). For details refer to the
documentation of your assembler/compiler.
General purpose registers
Register name
Usage
r0
Zero register
r1
Assembler-reserved register
r2
User address/data variable register
r3
Stack pointer
r4
Global pointer
r5
Text pointer
r6 to r29
User address/data variable registers
r30
Element pointer
r31
Link pointer
a)
Registers r0 and r30 are used by dedicated instructions.
b)
Registers r1, r3, r4, r5, and r31 may be used by the assembler/compiler.
Before using registers r1, r3 to r5, r30, and r31, their contents must be saved
so that they are not lost. The contents must be restored to the registers after
the registers have been used.
User's Manual U18743EE1V2UM00
CPU System Functions
Operation
Always holds 0. It is used for
operations using 0 and offset 0
a
addressing.
Used for 32-bit direct addressing.
Used to generate stack frame when
b
function is called.
Used to access global variable in
b
data area.
Used to indicate the start of the text
area (where program code is
b
located).
Base pointer when memory is
accessed by means of instructions
SLD (short format load) and SST
a
(short format store).
Used when calling a function.
b
b

Advertisement

Table of Contents
loading

Table of Contents