English
Language : 

CC78K4 Datasheet, PDF (486/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 13 EFFECTIVE UTILIZATION OF COMPILER
(3) Function definitions
For a function to be called over and over again, object code should be shortened or a structure which allows
calling at high speeds should be provided. If the callt table can be used for functions to be called frequently,
such functions should be defined as callt functions. Likewise, if the callf area can be used for functions to be
called frequently, such functions should be defined as callf functions. The callf functions can be called faster
than ordinary function calls with shorter codes because the callf functions are called using the callf area of the
device. The callt functions are effective when codes needs to be shortened because the callt functions use the
callt area of the device and are called with shorter code than callf.
Definition of callt function: callt int tsub() {
:
}
Definition of callf function: callf int tsub()
:
}
Remark Refer to 11.5 (1) callt function and 11.5 (15) callf function.
In addition to the use of the areas shown above, objects that do not need modification of the C source by
compiling with the optimization option can be generated. For the effect of each -Q suboption, refer to the
CC78K4 C Compiler Operation User’s Manual (U15557E).
(4) Optimization option
The optimization options that emphasize the object code size the most is as follows.
[Object code is emphasized the most]
-QX3
Further shortening of the code size and improvement of the execution speed is possible by adding _ _sreg or _
_sreg1 to variables. However, this is restricted to the cases when saddr2 area or saddr1 area can be used.
When the areas have no more space and cannot be used, a compilation error occurs.
If execution speed is also highly emphasized, specify the -QX2 default.
If the code size is smaller than -QX3, -QX4 can be specified. However, there are restrictions during debugging.
486
User’s Manual U15556EJ1V0UM