µPD705100
8. REGISTER SETS
8.1 Program Register Set
The V830 has two types of register sets: general-purpose register sets which can be used by programmers, and
system register sets which control the state of the V830. The width of all registers is 32 bits.
8.1.1 General-purpose register set
(1) General-purpose registers
The V830 has 32 general-purpose registers, r0-r31, which can be used either as data registers or address
registers. Note, however, that r0, r30, and r31 contain values that are fixed by hardware or which are used implicitly
by instructions.
(a) Hardware-dependent registers
Hardware-dependent registers contain values that are fixed by hardware or which are used implicitly by
instructions.
r0 : Zero register
Always contains 0.
r30 : Register reserved for operation
Serves as an auxiliary register which stores the result of a multiplication or division instruction.
r31 : Link pointer
The JAL instruction stores the return address in this register.
(b) Software-reserved registers
These registers are used by assemblers and compilers. To use them as registers for variables, first save
their contents to guard against data loss or damage. When their use is no longer required restore the saved
contents.
r1 : Assembler-reserved register
Serves as a working register for creating 32 bits of immediate data. It is used implicitly when
the assembler calculates an effective address.
r2 : Handler stack pointer
Reserved as the stack pointer for a handler.
r3 : Stack pointer
Reserved for stack frame creation when a function is called.
r4 : Global pointer
Used when accessing a global variable in a data area.
r5 : Text pointer
Points to the beginning of a text area.
21