mfsrr1
Move from SRR1 - 7C 00 02 A6
mfsrr1
Instruction Syntax
Mnemonic | Format | Flags |
mfsrr1 | rD | None |
Instruction Encoding
0
1
1
1
1
1
D
D
D
D
D
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Field | Bits | Description |
Primary Opcode | 0-5 | 011111 (0x1F) |
rD | 6-10 | Destination register |
rA | 11-15 | 00000 (unused) |
rB | 16-20 | 00000 (unused) |
XO | 22-29 | 01010110 (0x56) |
Operation
rD ← SRR1
MFSRR1 copies the contents of the Save/Restore Register 1 (SRR1) into the destination register rD.
- Reads the value from the Save/Restore Register 1 (SRR1)
- Copies it to the destination register rD
Note: SRR1 contains the machine state information that was saved when the exception occurred.
Affected Registers
General Purpose Registers (GPRs)
- rD (Destination register) - Loaded with SRR1 value
Examples
Basic SRR1 Read
# Read the Save/Restore Register 1 mfsrr1 r3 # r3 = SRR1
Exception Handler
# In an exception handler exception_handler: mfsrr1 r3 # Get the saved machine state # Process the exception using the state information in r3
Debug Information
# Get machine state for debugging mfsrr1 r10 # Save machine state # Log or process the state for debugging
Related Instructions
mtsrr1 (Move to SRR1), mfsrr0 (Move from SRR0), mtsrr0 (Move to SRR0), mfdar (Move from DAR)