English
Language : 

CC78K4 Datasheet, PDF (463/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
11.7.4 norec function call interface
(1) Passing arguments
(a) When the -ZO option is not specified (default)
On the function call side, arguments are passed via registers and _@NRARGX. For the registers, refer to
Table 11-17 Registers Used for norec Function Arguments: Passing Side (Without -ZO).
(b) When the -ZO option is specified
On the function call side, arguments are passed via a register and _@NRARGX. If the arguments cannot be
passed via registers any more, they are passed only via _@NRARGX instead of via registers. Arguments are
never passed via registers and _@NRARGX together.
(2) Location and order of storing arguments
• On the function definition side, all the arguments are allocated to registers and _@NRARGX. However,
arguments are allocated to _@NRARGX only when -QR is specified. For _@NRARGX, refer to APPENDIX A
LIST OF LABELS FOR saddr AREA.
• If there is an argument that cannot be allocated to registers and _@NRARGX, an error occurs.
(a) When the -ZO option is not specified (default)
• On the function definition side, the arguments passed via registers are copied to registers. Even when the
arguments are passed via registers, copying the register is necessary because the register on the function
call side (passing side) and the function definition side (receiving side) are different.
When the arguments are passed via _@NRARGX, the locations where arguments are passed are the same
as the locations where arguments are allocated.
If the arguments cannot be passed via registers any more, they are passed also via _@NRARGX. Arguments
are passed via registers and _@NRARGX together.
The saving and restoring of the register to which arguments are allocated is performed in the function
definition side. For the location of storing arguments, refer to Table 11-18 Registers Used for norec
Function Arguments: Receiving Side (Without -ZO).
User’s Manual U15556EJ1V0UM
463