eret
Exception Return
ERET
Returns from an exception.
Pseudocode Operation
PC ← ELR_ELx
CPSR ← SPSR_ELx
Branch(PC)
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0xD69F03E0 | ERET | A64 | 1101011 | 0100 | 11111 | 0000 | 0 | 0 | 11111 | 00000 |
Description
Exception Return using the ELR and SPSR for the current Exception level. When executed, the PE restores PSTATE from the SPSR, and branches to the address held in the ELR. The PE checks the SPSR for the current Exception level for an illegal return event. See Illegal return events from AArch64 state. ERET is UNDEFINED at EL0.
Operation
if PSTATE.EL == EL0 then UNDEFINED; AArch64.CheckForERetTrap(FALSE, TRUE); bits(64) target = ELR_ELx[]; AArch64.ExceptionReturn(target, SPSR_ELx[]);