APPENDIX C DSP FUNCTION
When a MCU which support the DSP function is used, it is necessary to note the treatment of the ACC register (accumulator). Concretely, please note it as follows when you use the following DSP instructions which update ACC register.
- RXv1/RXv2 architecture common instruction
MACHI, MACLO, MULHI, MULLO, RACW, MVTACHI, MVTACLO
- RXv2 architecture instructions
EMACA, EMSBA, EMULA, MACLH, MSBHI, MSBLH, MSBLO, MULLH, MVTACGU, RACL,RDACL, RDACW
In no case does the compiler generate these instructions.
Note also that if the "-chkdsp" option is specified in the assembler, the DSP function instructions written in a program are detected as warning.
C.1 When Using DSP Instructions in Tasks
C.2 When Using DSP Instructions in Handlers
If the application contains any tasks or interrupt handlers that use the above-mentioned DSP instructions, it is necessary that all of the interrupt handlers guarantee the ACC register. There are the following two method.
1 ) Use "-save_acc" compiler option