|
CC78K0S Datasheet, PDF (409/520 Pages) NEC – C Compiler Ver.1.30 or Later Language | |||
|
◁ |
CHAPTER 11 EXTENDED FUNCTIONS
(28) Array offset calculation simplification method
Array Offset Calculation Simplification Method
-QW2, -QW3, -QW4, -QW5
FUNCTION
⢠When calculating the offset of char/unsigned char/unsigned int/short/unsigned short types and the index
is an unsigned char-type variable, a code to calculate only lower bytes is generated based on the
presumption that there is no carry-over.
⢠When the -QW2 option is specified, a code to calculate only lower bytes for the offset is generated with a
speed-based priority only when referencing the sequence of the saddr area configuration with an unsigned
char variable.
⢠When the -QW3 option is specified, the code to calculate only lower bytes for the offset is generated with a
speed-based priority when referencing the sequence with an unsigned char variable regardless of the
configured area.
⢠When the -QW4 option is specified, a code to calculate only lower bytes for the offset is generated with a
size-based priority only when referencing the sequence of the saddr area configuration with an unsigned
char variable.
⢠When the -QW5 option is specified, a code to calculate only lower bytes for the offset is generated with a
size-based priority when referencing the sequence with an unsigned char variable regardless of the
configured area.
EFFECT
⢠Realizes object code reduction and execution speed improvement since the offset calculation code is
simplified.
USAGE
⢠Specify the -QW2, -QW3, -QW4, and -QW5 options during compilation.
EXAMPLE
(C source)
unsigned char c ;
unsigned char ary [10] ;
sreg unsigned char sary [10] ;
void main ()
{
unsigned char a ;
a = ary [c] ;
a = sary [c] ;
}
Userâs Manual U14872EJ1V0UM
409
|
▷ |