English
Language : 

CC78K0S Datasheet, PDF (461/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(3) Location and order of storing automatic variables
(a) Storage location of automatic variables
• There are two types of automatic variables: automatic variables to be allocated to registers and normal
automatic variables.
• Automatic variables allocated to registers are automatic variables declared with registers and automatic
variables when -QV is specified.
• Register variables are allocated after register arguments are allocated. For this reason, the allocation of
register variables to registers is performed only when registers are superfluous after register argument
allocation.
• The remaining automatic variables are allocated to the function-specific area.
• Saving and restoring registers to which arguments are allocated is performed on the function definition
side.
(b) Automatic variable allocation sequence
• Automatic variables are allocated to register DE according to the following rules.
(Registers to be used)
DE
(Allocation sequence)
char type:
Sequence of E, D
int, short, enum type: DE
• The automatic variables that are allocated to the function-specific area are allocated in the sequence of
declaration.
[EXAMPLE 1]
(C source)
void func4 (register int, char) ;
void main ()
{
func4 (0x1234, 0x56) ;
}
void func4 (register int p1, char p2)
{
register char r ;
int a ;
r = p2 ;
a = p1 ;
}
User’s Manual U14872EJ1V0UM
461