Return From Exception loads two consecutive memory locations using an address in a base register:
An address adjusted by the size of the data loaded can optionally be written back to the base register.
The PE checks the value of the word loaded from the higher address for an illegal return event. See Illegal return events from AArch32 state.
RFE is undefined in Hyp mode and constrained unpredictable in User mode.
It has encodings from the following instruction sets: A32 ( A1 ) and T32 ( T1 and T2 ) .
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
1 | 1 | 1 | 1 | 1 | 0 | 0 | P | U | 0 | W | 1 | Rn | (0) | (0) | (0) | (0) | (1) | (0) | (1) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) |
n = UInt(Rn); wback = (W == '1'); increment = (U == '1'); wordhigher = (P == U); if n == 15 then UNPREDICTABLE;
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | W | 1 | Rn | (1) | (1) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) |
n = UInt(Rn); wback = (W == '1'); increment = FALSE; wordhigher = FALSE; if n == 15 then UNPREDICTABLE; if InITBlock() && !LastInITBlock() then UNPREDICTABLE;
15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | W | 1 | Rn | (1) | (1) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) | (0) |
n = UInt(Rn); wback = (W == '1'); increment = TRUE; wordhigher = FALSE; if n == 15 then UNPREDICTABLE; if InITBlock() && !LastInITBlock() then UNPREDICTABLE;
For more information about the constrained unpredictable behavior of this instruction, see Architectural Constraints on UNPREDICTABLE behaviors.
IA |
For encoding A1: is an optional suffix to indicate the Increment After variant. |
For encoding T2: is an optional suffix for the Increment After form. |
<c> |
For encoding A1: see Standard assembler syntax fields. <c> must be AL or omitted. |
For encoding T1 and T2: see Standard assembler syntax fields. |
<q> |
<Rn> |
Is the general-purpose base register, encoded in the "Rn" field. |
! |
The address adjusted by the size of the data loaded is written back to the base register. If specified, it is encoded in the "W" field as 1, otherwise this field defaults to 0. |
RFEFA, RFEEA, RFEFD, and RFEED are pseudo-instructions for RFEDA, RFEDB, RFEIA, and RFEIB respectively, referring to their use for popping data from Full Ascending, Empty Ascending, Full Descending, and Empty Descending stacks.
if ConditionPassed() then EncodingSpecificOperations(); if PSTATE.EL == EL2 then UNDEFINED; elsif PSTATE.EL == EL0 then UNPREDICTABLE; // UNDEFINED or NOP else address = if increment then R[n] else R[n]-8; if wordhigher then address = address+4; new_pc_value = MemA[address,4]; spsr = MemA[address+4,4]; if wback then R[n] = if increment then R[n]+8 else R[n]-8; AArch32.ExceptionReturn(new_pc_value, spsr);
If PSTATE.EL == EL0, then one of the following behaviors must occur:
Internal version only: isa v00_98, pseudocode v8.5-2019-06_rc2-5-g22901f2 ; Build timestamp: 2019-06-27T01:26
Copyright © 2010-2019 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.