mtsprg
Move to SPRG - 7C 00 03 A6
mtsprg
Instruction Syntax
Mnemonic | Format | Flags |
mtsprg | SPRGn, rS | None |
Instruction Encoding
0
1
1
1
1
1
S
S
S
S
S
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) |
rS | 6-10 | Source register |
rA | 11-15 | 00000 (unused) |
rB | 16-20 | 00000 (unused) |
XO | 22-29 | 01110110 (0x76) |
Operation
SPRGn ← rS
MTSPRG copies the contents of the source register rS into the specified Special Purpose Register General (SPRGn).
- Reads the value from the source register rS
- Copies it to the specified SPRG register
Note: SPRG registers are used for temporary storage during exception handling.
Affected Registers
- SPRGn (Special Purpose Register General) - Loaded with value from rS
Examples
# Save r3 in SPRG0 mtsprg 0, r3 # Save r4 in SPRG1 mtsprg 1, r4
Related Instructions
mfsprg (Move from SPRG), mfsrr0 (Move from SRR0), mfsrr1 (Move from SRR1), mfdar (Move from DAR)