Chapter 2. Programming Model
2-69
Instruction Set Summary
2.3.6 PowerPC OEA Instructions
The PowerPC operating environment architecture (OEA) includes the structure of the
memory management model, supervisor-level registers, and the exception model.
Implementations that conform to the OEA also adhere to the UISA and the VEA. This
section describes the instructions provided by the OEA.
2.3.6.1 System Linkage InstructionsOEA
This section describes the system linkage instructions (see Table 2-52). The user-level
sc
instruction lets a user program call on the system to perform a service and causes the
processor to take a system call exception. The supervisor-level
rT
instruction is used for
returning from an exception handler.
2.3.6.2 Processor Control InstructionsOEA
This section describes the processor control instructions used to access the MSR and the
SPRs. Table 2-53 lists instructions for accessing the MSR.
The OEA deTnes encodings of
mtspr
and
mfspr
to provide access to supervisor-level
registers. The instructions are listed in Table 2-54.
Encodings for the architecture-deTned SPRs are listed in Table 2-45. Encodings for
MPC7400-speciTc, supervisor-level SPRs are listed in Table 2-46. SimpliTed mnemonics
are provided for
mtspr
and
mfspr
in Appendix F, òSimpliTed Mnemonics,ó in
The
Programming Environments Manual
. For a discussion of context synchronization
requirements when altering certain SPRs, refer to Appendix E, òSynchronization
Programming Examples,ó in
The Programming Environments Manual
.
Table 2-52. System Linkage InstructionsOEA
Name
Mnemonic
Syntax
Implementation Notes
System Call
sc
The
sc
instruction is context-synchronizing.
Return from
Interrupt
rT
The
rT
instruction is context-synchronizing. For the MPC7400, this means
the
rT
instruction works its way to the Tnal stage of the execution pipeline,
updates architected registers, and redirects the instruction ow.
Table 2-53. Move to/from Machine State Register Instructions
Name
Mnemonic
Syntax
Move to Machine State Register
mtmsr
r
S
Move from Machine State Register
mfmsr
r
D
Table 2-54. Move to/from Special-Purpose Register Instructions (OEA)
Name
Mnemonic
Syntax
Move to Special-Purpose Register
mtspr
SPR
,r
S
Move from Special-Purpose Register
mfspr
r
D
,
SPR