English
Language : 

CC78K0S Datasheet, PDF (406/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 11 EXTENDED FUNCTIONS
(27) Method of int expansion limitation of argument/return value
Method of int Expansion Limitation of Argument/Return Value
-ZB
FUNCTION
• When the type definition of the function return value is char/unsigned char, the int expansion code of the
return value is not generated.
• When the prototype of the function argument is defined and the argument definition of the prototype is
char/unsigned char, the int expansion code of the argument is not generated.
EFFECT
• The object code can be reduced and the execution speed improved since the int expansion codes are not
generated.
USAGE
• The -ZB option is specified during compilation.
EXAMPLE
(C source)
unsigned char func1(unsigned char x, unsigned char y);
unsigned char c, d, e;
void main()
{
c = func1(d, e);
c = func2(d, e);
}
unsigned char func1(unsigned char x, unsigned char y)
{
return x + y;
}
(Output object of compiler)
When -ZB is specified
_main:
; line 5:
mov
xch
push
mov
xch
c = func1 (d, e) ;
a, !_e
a, x
ax
a, !_d
a, x
call !_func1
; int expansion is not executed
; int expansion is not executed
406
User’s Manual U14872EJ1V0UM