Registers having the same value before and after a function call is not guaranteed for some registers; some registers may change during a function call. Some registers are used for specific purposes according to the option settings. Table 3.27 shows the rules for using registers.
The high-speed interrupt function may use some or all four registers among R10 to R13, depending on the fint_register option. Registers assigned to the high-speed interrupt function cannot be used for other purposes. For details on the function, refer to the description on the option. |
The base register function may use some or all six registers among R8 to R13, depending on the base option. Registers assigned to the base register function cannot be used for other purposes. For details on the function, refer to the description on the option. |
The PID function may use one of R9 to R13, depending on the pid option. The register assigned to the PID function cannot be used for other purposes. For details on the function, refer to the description on the option. |
This does not apply in the case when the registers are set or modified through an intrinsic function or #pragma inline_asm. |
This depends on the specifications of the instruction used for function calls. To call a function, use BSR, JSR, BRA, or JMP. |
For the instructions that modify the ACC (accumulator), refer to the software manual for the target RX series product. |