Simplified Mnemonics for PowerPC Instructions
PowerPC e500 Core Family Reference Manual, Rev. 1
Freescale Semiconductor
C-23
The comparison results in five conditions that are ANDed with operand TO. If the result is not 0,
the trap exception handler is invoked. See
Table C-27
for these conditions.
C.8
Simplified Mnemonics for Accessing SPRs
The mtspr and mfspr instructions specify a special-purpose register (SPR) as a numeric operand.
Simplified mnemonics are provided that represent the SPR in the mnemonic rather than requiring
it to be coded as a numeric operand. The pattern for mtspr and mfspr simplified mnemonics is
straightforward: replace the -spr portion of the mnemonic with the abbreviation for the spr (for
example XER, SRR0, or LR), eliminate the SPRN operand, leaving the source or destination GPR
operand, rS or rD.
Following are examples using the SPR simplified mnemonics:
1. Copy the contents of rS to the XER.
mtxer rS equivalent
to
mtspr 1,rS
2. Copy the contents of the LR to rS.
mflr rD equivalent
to
mfspr rD,8
3. Copy the contents of rS to the CTR.
mtctr rS equivalent
to
mtspr 9,rS
The examples above show simplified mnemonics for accessing SPRs defined by the AIM version
of the PowerPC architecture; however, the same formula is used for Book E, EIS, and
implementation-specific SPRs, as shown in the following examples:
1. Copy the contents of rS to CSRR0.
mtcsrr0 rS equivalent
to
mtspr 58,rS
2. Copy the contents of IVOR0 to rS.
mfivor0 rD equivalent
to
mfspr rD,400
3. Copy the contents of rS to the MAS1.
mtmas1 rS equivalent
to
mtspr 625,rS
Table C-27. TO Operand Bit Encoding
TO Bit
ANDed with Condition
0
Less than, using signed comparison
1
Greater than, using signed comparison
2
Equal
3
Less than, using unsigned comparison
4
Greater than, using unsigned comparison
Summary of Contents for PowerPC e500 Core
Page 1: ...PowerPC e500 Core Family Reference Manual Supports e500v1 e500v2 E500CORERM Rev 1 4 2005...
Page 36: ...PowerPC e500 Core Family Reference Manual Rev 1 xxxvi Freescale Semiconductor...
Page 38: ...PowerPC e500 Core Family Reference Manual Rev 1 Part I 2 Freescale Semiconductor...
Page 332: ...PowerPC e500 Core Family Reference Manual Rev 1 Part II 2 Freescale Semiconductor...
Page 530: ...Opcode Listings PowerPC e500 Core Family Reference Manual Rev 1 D 50 Freescale Semiconductor...
Page 534: ...PowerPC e500 Core Family Reference Manual Rev 1 E 4 Freescale Semiconductor Revision History...