English
Language : 

CC78K4 Datasheet, PDF (302/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 11 EXTENDED FUNCTIONS
Usage of saddr Area
sreg/_ _sreg
RESTRICTIONS
If const type is specified, or if sreg/_ _sreg is specified for a function, a warning message is output, and the
sreg declaration is ignored.
Arguments of functions and automatic variables cannot be specified to this area.
char type uses half the space of other types and long/float/double/long double types use twice the space.
Function pointers of the medium model and the large model use one and a half the amount of space as other
types.
All the types have byte boundaries.
When -ZA is specified, only _ _sreg is enabled and sreg is disabled.
The following shows the maximum number of sreg variables that can be used per load module.
Table 11-9. Restrictions on sreg Variable Usage
Data Type
int/short
Function pointer of medium model
Pointer of large model
Usable Number of sreg Variables (Per Load Module)
Max. 112 (96 when -QR is specified)Note
Max. 74 (64 when -QR is specified)Note
Max. 74 (64 when -QR is specified)Note
Note When the -QR option is not specified, the reserved area for the argument of the norec function/automatic
variables and register variables (32 bytes of saddr2 area) can be used as sreg variable area. When bit and
boolean type variables are used, the usable number is decreased.
EXAMPLE
The following shows an example when the large model is used.
(C source)
extern sreg int hsmm0;
extern sreg int hsmm1;
extern sreg int *hsptr;
void main ( ) {
hsmm0 -= hsmm1;
}
302
User’s Manual U15556EJ1V0UM