
MOTOROLA
Chapter 2. Programming Model
2-43
2.3.6.2.1 Move to/from Machine State Register Instructions
Table 2-37 lists the instructions provided by the 603e for reading from or writing to the
MSR.
2.3.6.2.2 Move to/from Special-Purpose Register Instructions
Simplified mnemonics are provided for the
mtspr
and
mfspr
instructions so they can be
coded with the SPR name as part of the mnemonic rather than as a numeric operand. See
Appendix F, “Simplified Mnemonics,” in
The Programming Environments Manual
for
simplified mnemonic examples. The
mtspr
and
mfspr
instructions are shown in
Table 2-38.
For
mtspr
and
mfspr
instructions, the SPR number coded in assembly language does not
appear directly as a 10-bit binary number in the instruction. The number coded is split into
two 5-bit halves that are reversed in the instruction encoding, with the high-order 5 bits
appearing in bits 16–20 of the instruction encoding and the low-order 5 bits in bits 11–15.
If the SPR field contains any value other than one of the values shown in Table 2-39, either
the program exception handler is invoked or the results are boundedly undefined.
Table 2-37. Move to/from Machine State Register Instructions
Name
Mnemonic
Operand Syntax
Move to Machine State Register
mtmsr
r
S
Move from Machine State Register
mfmsr
r
D
Table 2-38. Move to/from Special-Purpose Register Instructions
Name
Mnemonic
Operand Syntax
Move to Special-Purpose Register
mtspr
SPR
,r
S
Move from Special-Purpose Register
mfspr
r
D
,
SPR
Table 2-39. Implementation-specific SPR Encodings (mfspr)
SPR*
Register Name
Decimal
spr[5–9]
spr[0–4]
976
11110
10000
DMISS
977
11110
10001
DCMP
978
11110
10010
HASH1
979
11110
10011
HASH2
980
11110
10100
IMISS
981
11110
10101
ICMP