English
Language : 

CC78K0S Datasheet, PDF (458/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(3) Location and order of storing automatic variables
Automatic variables are allocated to registers and _@NRARGx as long as there are allocable registers and
_@NRARGx. If there is no allocable register, 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 a register, _@NRARGx and _@NRATxx, an error
occurs.
Saving and restoring registers to which automatic variables are allocated is performed on the function definition
side.
(Allocation sequence)
• The order of allocating automatic variables to registers, _@RTARG6 to 7 is the same as the order of
allocating arguments.
• The automatic variables allocated to _@NRARGx, _@NRATxx are allocated in the order of declaration.
[Example]
In the normal model
(C source)
norec void func3 (char, int, char, int) ;
void main ()
{
func3 (0x12, 0x34, 0x56, 0x78) ;
}
norec void func3 (char p1, int p2, char p3, int p4)
{
int a ;
a = p2 ;
}
458
User’s Manual U14872EJ1V0UM