EasyManua.ls Logo

Freescale Semiconductor PowerPC e500 Core - Simplified Mnemonics for Accessing Sprs

Default Icon
548 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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

Table of Contents

Related product manuals