R01UH0823EJ0100 Rev.1.00 Page 264 of 1823
Jul 31, 2019
RX23W Group 14. Exception Handling
14.4 Hardware Processing for Accepting and Returning from Exceptions
This section describes the hardware processing for accepting and returning from exceptions other than a reset.
(1) Hardware Pre-Processing for Accepting an Exception
(a) Saving PSW
ï‚· For a fast interrupt
PSW → BPSW
ï‚· For exceptions other than a fast interrupt
PSW → Stack
Note: The values in FPSW are not saved by hardware pre-processing. Therefore, if floating-point instructions are to be
used within an exception handling routine, the user must save these values on the stack within the exception
handling routine.
(b) Updating PM, U, and I Bits in PSW
I: Set to 0
U: Set to 0
PM: Set to 0
(c) Saving PC
ï‚· For a fast interrupt
PC → BPC
ï‚· For exceptions other than a fast interrupt
PC → Stack
(d) Setting Branch Destination Address of Exception Handling Routine in PC
Processing is shifted to the exception handling routine by acquiring the vector corresponding to the exception and then
branching accordingly.
(2) Hardware Post-Processing for Execution of RTE and RTFI Instructions
(a) Restoring PSW
ï‚· For a fast interrupt
BPSW → PSW
ï‚· For exceptions other than a fast interrupt
Stack → PSW
(b) Restoring PC
ï‚· For a fast interrupt
BPC → PC
ï‚· For exceptions other than a fast interrupt
Stack → PC
(c) Clearing the LI flag