s5u1c33000c Epson Electronics America, Inc., s5u1c33000c Datasheet - Page 101

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
6.5.3 Method of Using Registers
The following shows how the gcc33 uses general-purpose registers.
Registers for saving values when calling a function (R0 to R3)
Scratch registers (R4 to R7)
Global pointer (R8)
Scratch register for expanding extended instructions (R9)
Registers for storing returned values (R10, R11)
Registers for passing arguments (R12 to R15)
Note: When creating assembler subroutines that are called from C routines, pay attention to the
S5U1C33000C MANUAL
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
These registers are used to store the calculation results of expressions and local variables. These register
values after returning from a function must be the same as those when the function was called. Therefore,
the called function has to save and restore the register values if it modifies the register contents.
These registers are used to store the temporary calculation results of expressions and local variables. These
registers do not need to be saved when calling a function.
This register is reserved for storing a global pointer. The gcc33 does not use this register.
Provided for use in assemble, this register is used by the Instruction Extender ext33 as it expands an
extended instruction. The gcc33 does not use this register.
These registers are used to store returned values. They are used as scratch registers before storing a returned
value.
These registers are used to store arguments when calling a function. Arguments exceeding the four words
are stored in the stack before being passed. They are used as scratch registers before storing arguments.
Register
register usage.
• The R4 to R7 registers can be used without saving/restoring the contents.
• The R10 and R11 registers can be used without saving/restoring the contents until a returned
• Before the R12 to R15 registers can be used, the stored arguments must be used or saved in
• Try to use the R8 and R9 registers as little as possible.
• Before the R0 to R3 registers can be used, the contents must be saved to stack using the
R10
R11
R12
R13
R14
R15
value is set in the register before returning.
other locations. It is necessary to restore the contents before returning.
pushn instruction. Also, the saved contents must be restored from the stack using the popn
instruction.
R0
R1
R2
R3
R4
R5
R6
R7
R8
R9
Registers that need have to their values saved when calling a function
Scratch registers
Global pointer (unused; used by ext33)
Scratch register for expanding extended instruction (unused; used by ext33)
Register for storing returned values (8/16/32-bit data, 32 low-order bits of double-type data)
Register for storing returned values (32 high-order bits of double-type data)
Register for passing argument (1st word)
Register for passing argument (2nd word)
Register for passing argument (3rd word)
Register for passing argument (4th word)
Table 6.5.3.1 Method of using general-purpose registers by gcc33
EPSON
Method of use
CHAPTER 6: C COMPILER
85

Related parts for s5u1c33000c