English
Language : 

CC78K4 Datasheet, PDF (465/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
(3) Location and order of storing automatic variables
(a) When the -ZO option is not specified
The automatic variables are allocated to registers and _@NRARGX as long as there are allocable registers
and _@NRARGX. If there is no allocable register any more, they are allocated to _@NRATXX.
However, automatic variables are allocated to _@NRARGX and _@NRATXX only when -QR is specified.
For _@NRATXX, refer to APPENDIX A LIST OF LABELS FOR saddr AREA
If there is an automatic variable that cannot be allocated to registers, _@NRARGX and _@NRATXX, an error
occurs.
The saving and restoring of registers to which automatic variables are allocated is performed on the function
definition side.
(Order of allocating automatic variables)
• The order of allocating automatic variables to registers is the same as the order of allocating noauto
function arguments. For details, refer to 11.7.3 noauto function call interface.
• The automatic variables allocated to _@NRATXX are allocated in the order of declaration.
(b) When the -ZO option is specified
• The automatic variables are allocated to registers as long as there are allocable registers. If there are no
more allocable registers, they are allocated to _@NRATXX.
• Automatic variables are allocated to _@NRATXX only when -QR is specified. For _@NRATXX, refer to
APPENDIX A LIST OF LABELS FOR saddr AREA.
• The automatic variables are allocated after arguments are allocated. Therefore, the automatic variables
are allocated to registers when there are excess registers after the allocation of arguments.
• If there is an automatic variable that cannot be allocated to a register and _@NRATXX, an error occurs.
• The saving and restoring of registers to allocate automatic variables is performed on the function definition
side.
(Order of allocating automatic variables)
• The order of allocating registers to automatic variables is the same as the order of allocating noauto
function arguments. For details, refer to 11.7.3 noauto function call interface.
• The automatic variables allocated to _@NRARGX and _@NRATXX are allocated in the order of
declaration.
User’s Manual U15556EJ1V0UM
465