20.5 Note Concerning system.context
This sections explains note concerning system.context.
20.5.1 Note concerning FPU and DSP
The setting for system.context differs depending on how FPU and DSP are handled.
The recommendation setting of system.context is indicated from now on. If other than recommended setting is specified, the RI600PX performance may be slightly deteriorated, compared to the recommended settings case.
Note The compiler outputs floating-point arithmetic instructions only when the -fpu option is specified. If the -chkfpu option is specified in the assembler, the floating-point arithmetic instructions written in a program are detected as warning.
In no case does the compiler output the DSP function instructions. If the -chkdsp option is specified in the assembler, the DSP function instructions written in a program are detected as warning.
1 ) When using MCU that incorporates FPU and DSP (accumulator)
Table 20-3 When using MCU that incorporates FPU and DSP (accumulator)
Usage condition of instruction in tasks
|
Recommendation setting of system.context
|
Floating point arithmetic instructions
|
DSP function instructions
|
|
|
"FPSW" and "ACC" included settings essential
|
|
"FPSW" included setting essential and "ACC" excluded setting recommended
|
|
|
"ACC" included setting essential and "FPSW" excluded setting recommended
|
|
"FPSW" and "ACC" excluded settings recommended
|
2 ) When using MCU that does not incorporate FPU, but incorporates DSP (accumulator)
Table 20-4 When using MCU that does not incorporate FPU, but incorporates DSP (accumulator)
Usage condition of instruction in tasks
|
Recommendation setting of system.context
|
Floating point arithmetic instructions
|
DSP function instructions
|
|
|
Since the MCU does not incorporate FPU, floating-point arithmetic instructions cannot be used.
|
|
|
|
"FPSW" excluded and "ACC" included settings essential
|
|
"FPSW" excluded setting essential and "ACC" excluded settings recommended
|
3 ) When using MCU that incorporates FPU, but does not incorporate DSP (accumulator)
Table 20-5 When using MCU that incorporates FPU, but does not incorporate DSP (accumulator)
Usage condition of instruction in tasks
|
Recommendation setting of system.context
|
Floating point arithmetic instructions
|
DSP function instructions
|
|
|
Since the MCU does not incorporate DSP, DSP function instructions cannot be used.
|
|
"FPSW" included and "ACC" excluded settings essential
|
|
|
Since the MCU does not incorporate DSP, DSP function instructions cannot be used.
|
|
"ACC" excluded setting essential and "FPSW" excluded settings recommended
|
4 ) When using MCU that incorporate neither FPU nor DSP (accumulator)
Table 20-6 When using MCU that incorporate neither FPU nor DSP (accumulator)
Usage condition of instruction in tasks
|
Recommendation setting of system.context
|
Floating point arithmetic instructions
|
DSP function instructions
|
|
|
Since the MCU incorporate neither FPU nor DSP, floating-point arithmetic instructions and DSP function instructions cannot be used.
|
|
|
|
|
"FPSW" and "ACC" excluded settings essential
|
20.5.2 Relationship with the compiler options "fint_register", "base" and "pid"
n system.context, by selecting one of choices "MIN," "MIN, ACC", "MIN, FPSW," or "MIN, ACC, FPSW," it is possible to configure the registers so that R8- R13 registers will not be saved as task context. This results in an increased processing speed.
Note, however, that such a setting of system.context is permitted in only the case where all of R8 - R13 registers are specified to be used by the compiler options "-fint_register", "-base" and "-pid".
If, in any other case, the above setting is made for system.context, the kernel will not operate normally.
1 ) -fint_register=4 -base=rom=R8 -base=ram=R9
2 ) -fint_register=3 -base=rom=R8 -base=ram=R9 -base=0x80000=R10
3 ) No "-fint_register", "-base" and "-pid" options
5 ) -base=rom=R8 -base=ram=R9
6 ) -fint_register=3 -base=rom=R8 -base=ram=R9