eret

Exception return

Returns from an exception or interrupt handler by restoring the PC from EPC and clearing the exception level bit.

Used in

Forms

  • eret

Restores the PC from the EPC register (Coprocessor 0 register 14) and clears the Exception Level bit (bit 1) in the Status register, re-enabling interrupts and returning to user mode.

# eret loads the return PC from CP0 EPC. Inspect $t2: 2 after returning to resume.
la $t0, resume
mtc0 $t0, $14
eret
li $t2, 1
resume: li $t2, 2