English
Language : 

CC78K4 Datasheet, PDF (460/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
11.7.3 noauto function call interface
(1) Passing arguments
(a) When the -ZO option is not specified (default)
• On the function call side, the arguments declared with registers and the ordinary arguments are passed in
the same manner. The second and subsequent arguments are passed via a stack. The first argument is
passed via a register or a stack (in the same manner as ordinary functions).
• For the location where the first argument is passed, refer to Table 11-28.
(b) When the -ZO option is specified
• Arguments are passed via registers. For the registers to be used, refer to Table 11-13.
(2) Location and order of storing arguments
• On the function definition side, all the arguments are allocated to registers.
• If there is an argument that cannot be allocated to a register, an error occurs.
(a) When the -ZO option is not specified (default)
• On the function definition side, the arguments passed via registers or stacks are copied to registers. Even
when the arguments are passed via registers, the processing to copy the register is output because the
register on the function call side (passing side) and the function definition side (receiving side) are different.
For the registers allocated on the function definition side, refer to Table 11-14.
• The saving and restoring of the register to which arguments are allocated is performed on the function
definition side.
(Order of allocation)
• The order is the same as an ordinary function with -QF specified.
(b) When the -ZO option is specified
• The locations where arguments are passed on the function call side and the function definition side are the
same as the locations where arguments are allocated.
• The saving and restoring of registers to which arguments are allocated is performed before and after the
function call.
(Order of allocation)
• The order is the same as for ordinary functions.
460
User’s Manual U15556EJ1V0UM