English
Language : 

CC78K4 Datasheet, PDF (319/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
norec Function
norec
(b) When -ZO option is not specified
On the function call side, arguments are passed via a register and saddr2 area (_@NRARGX) for the
arguments of norec functions. On the function definition side, the arguments passed via a register are copied
to a register (because the registers of the function call side and the function definition side are different). If
arguments are passed via saddr2 area, the location where arguments are passed becomes the location
where arguments are allocated.
Arguments are allocated to registers first, and then the arguments that cannot be allocated to registers are
allocated to saddr2 area.
The save and restore of registers to store arguments are performed on the function definition side.
Automatic variables are allocated to registers or to saddr2 area (_@NRARGX) for the arguments of the norec
function if registers can be used. If the areas above cannot be used, automatic variables are allocated to
saddr2 area (_@NRATXX) for the automatic variables of the norec function in the sequence they have been
declared and in ascending order.
The following shows the registers to be used for passing the arguments of norec functions.
Table 11-17. Registers Used for norec Function Arguments: Passing Side (Without -ZO)
Data Type
char
int, short, enum
long/float/double/
long double
Small model pointer
Medium model data pointer
Large model pointer
First Argument
A
AX
DE (higher 16 bits)
AX (lower 16 bits)
AX
TDE
Second Argument
C
DE
saddr Note
DE
saddr2 Note
Third Argument or Later
DE, RP2, saddr2 Note
RP2, saddr2 Note
saddr2
RP2, saddr2 Note
saddr2 Note
Note When the -QR option is specified, there arguments can be passed via _@NRARGX (saddr2). Medium
model function pointers (3 bytes) cannot be used as the arguments to be allocated to registers.
User’s Manual U15556EJ1V0UM
319