rfid
Return From Interrupt Doubleword
rfid
Returns from an interrupt handler. Restores PC from SRR0 and MSR from SRR1.
Details
The rfid instruction restores the machine state from the interrupt stack frame, updating various special registers and setting the next instruction address based on the restored state.
Pseudocode Operation
MSR51 ← (MSR3 & SRR151) | ((¬MSR3) & MSR51)
MSR3 ← MSR3 & SRR13
MSR48 ← SRR148 | SRR149
MSR58 ← (SRR158 | SRR149) & ¬(MSR41 & MSR3 & (¬SRR149))
MSR59 ← (SRR159 | SRR149) & ¬(MSR41 & MSR3 & (¬SRR149))
MSR0:2 4:32 37:40 49:50 52:57 60:63 ← SRR10:2 4:32 37:40 49:50 52:57 60:63
NIA ← iea SRR00:61 || 0b00
Programming Note
If this instruction sets MSRPR to 1, it also sets MSREE, MSRIR, and MSRDR to 1. If this instruction results in MSRS HV PR being equal to 0b110, it also sets MSRIR and MSRDR to 0.
Example
rfid
Encoding
Binary Layout
19
0
/
6
/
11
/
16
18
21
/
31