mtsprg
Move to SPRG - 7C 00 03 A6
mtsprg

Instruction Syntax

MnemonicFormatFlags
mtsprgSPRGn, rSNone

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
FieldBitsDescription
Primary Opcode0-5011111 (0x1F)
rS6-10Source register
rA11-1500000 (unused)
rB16-2000000 (unused)
XO22-2901110110 (0x76)

Operation

SPRGn ← rS

MTSPRG copies the contents of the source register rS into the specified Special Purpose Register General (SPRGn).

  1. Reads the value from the source register rS
  2. Copies it to the specified SPRG register

Note: SPRG registers are used for temporary storage during exception handling.

Affected Registers

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)

Back to Index