17. CPU Exceptions

17.1 Causing and Returning from an Exception


When the processor takes an exception, the EXL bit in the Status register is set to 1, which means the system is in Kernel mode. After saving the appropriate state, the exception handler typically changes the KSU bits in the Status register to Kernel mode and resets the EXL bit back to 0. When restoring the state and restarting, the handler restores the previous value of the KSU field and sets the EXL bit back to 1.

Returning from an exception also resets the EXL bit to 0 (see the ERET instruction in Appendix A).




Copyright 1995, MIPS Technologies, Inc. -- 29 JAN 96


Generated with CERN WebMaker