English
Language : 

CC78K0S Datasheet, PDF (454/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
11.7.3 noauto function call interface (normal model only)
(1) Passing arguments
• On the function caller, arguments are passed in the same way as ordinary functions. Refer to 11.7.2
Ordinary function call interface.
• On the function definition side, arguments passed via a register or stack are copied to a register as well as
_@KREG12 to 15. Copying to _@KREG12 to 15 is performed only when -QR is specified. Even when the
arguments are passed via registers, register copying is necessary since the registers on the function caller
(passing side) are different to those on the function definition side (receiving side).
• Saving and restoring registers to which arguments are allocated is performed on the function definition side.
(2) Location and order of storing arguments
• On the function definition side, all arguments are allocated to registers and _@KREG12 to 15. However,
arguments are allocated to _@KREG12 to 15 only when -QR is specified.
• If there are arguments that are not allocated to registers or _@KREG12 to 15 an error will result.
• On the function caller, arguments are passed in the same way as in an ordinary function (Refer to 11.7.2
Ordinary function call interface).
• On the function definition side, the arguments passed via a register or stack are copied to a register as well as
_@KREG12 to 15. Even when the arguments are passed via registers, register copying is necessary since
the registers on the function caller (passing side) are different to those on the function definition side
(receiving side).
• Saving and restoring registers to which arguments are allocated is performed on the function definition side.
(Allocation sequence)
• The allocation sequence is the same as for ordinary functions (refer to 11.7.2 Ordinary function call
interface).
454
User’s Manual U14872EJ1V0UM