English
Language : 

CC78K4 Datasheet, PDF (455/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
11.7.2 Ordinary function call interface
When all the arguments are allocated to registers and there is no automatic variable, the ordinary function call
interface is the same as noauto function call interface.
(1) Passing arguments
(a) When the -ZO option is not specified (default)
• On the function call side, both 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, and the first
argument is passed via a register or stack.
• The location where the first argument is passed is shown in Table 11-28.
Table 11-28. Location Where First Argument Is Passed (On Function Call Side)
Type
1-byte integerNote
2-byte integer
3-byte integer
Option
4-byte integer Note
Floating-point number (float type)
Floating-point number (double type)
Other
When -ZO Is Not Specified
AX
WHL
Small model is passed via a stack
AX, RP2
AX, RP2
AX, RP2
Passed via a stack
When -ZO Is Specified
Passed via a stack
Passed via a stack
Passed via a stack
Passed via a stack
Passed via a stack
Passed via a stack
Note 1- to 4-byte data includes structures, unions, and pointers.
(b) When the -ZO option is specified
• On the function call side, arguments declared with a register are passed via a register, and ordinary
arguments are passed via a stack. For the registers used for passing, refer to Table 11-30.
User’s Manual U15556EJ1V0UM
455