PowerPC e500 Core Family Reference Manual, Rev. 1
C-24
Freescale Semiconductor
Simplified Mnemonics for PowerPC Instructions
There is an additional simplified mnemonic formula for accessing SPRGs, although not all of
these more complicated simplified mnemonics are supported by all assemblers. These are shown
in
Table C-28
along with the equivalent simplified mnemonic using the formula described above.
C.9
Recommended Simplified Mnemonics
This section describes commonly-used operations (such as no-op, load immediate, load address,
move register, and complement register).
C.9.1
No-Op (nop)
Many instructions can be coded in a way that, effectively, no operation is performed. An additional
mnemonic is provided for the preferred form of no-op. If an implementation performs any type of
run-time optimization related to no-ops, the preferred form is the following:
nop
equivalent toori 0,0,0
C.9.2
Load Immediate (li)
The addi and addis instructions can be used to load an immediate value into a register. Additional
mnemonics are provided to convey the idea that no addition is being performed but that data is
being moved from the immediate operand of the instruction to a register.
1. Load a 16-bit signed immediate value into rD.
li rD,value
equivalent to
addi rD,0,value
2. Load a 16-bit signed immediate value, shifted left by 16 bits, into rD.
lis rD,value
equivalent to
addis rD,0,value
C.9.3
Load Address (la)
This mnemonic permits computing the value of a base-displacement operand, using the addi
instruction that normally requires a separate register and immediate operands.
la rD,d(rA)
equivalent to
addi rD,rA,d
The la mnemonic is useful for obtaining the address of a variable specified by name, allowing the
assembler to supply the base register number and compute the displacement. If the variable
v
is
Table C-28. Additional Simplified Mnemonics for Accessing SPRGs
SPR
Move to SPR
Move from SPR
Simplified Mnemonic
Equivalent to
Simplified Mnemonic
Equivalent to
SPRGs
mtspr
g
n,
r
S
mtspr
272 +
n
,r
S
mfsprg
r
D
, n
mfspr
r
D
,
272 +
n
mtspr
g
n,
r
S
mfsprg
n
r
D
Содержание PowerPC e500 Core
Страница 1: ...PowerPC e500 Core Family Reference Manual Supports e500v1 e500v2 E500CORERM Rev 1 4 2005...
Страница 36: ...PowerPC e500 Core Family Reference Manual Rev 1 xxxvi Freescale Semiconductor...
Страница 38: ...PowerPC e500 Core Family Reference Manual Rev 1 Part I 2 Freescale Semiconductor...
Страница 316: ...PowerPC e500 Core Family Reference Manual Rev 1 7 18 Freescale Semiconductor Performance Monitor...
Страница 332: ...PowerPC e500 Core Family Reference Manual Rev 1 Part II 2 Freescale Semiconductor...
Страница 362: ...PowerPC e500 Core Family Reference Manual Rev 1 10 26 Freescale Semiconductor Auxiliary Processing Units APUs...
Страница 440: ...PowerPC e500 Core Family Reference Manual Rev 1 A 8 Freescale Semiconductor Programming Examples...
Страница 444: ...PowerPC e500 Core Family Reference Manual Rev 1 B 4 Freescale Semiconductor Guidelines for 32 Bit Book E...
Страница 530: ...Opcode Listings PowerPC e500 Core Family Reference Manual Rev 1 D 50 Freescale Semiconductor...
Страница 534: ...PowerPC e500 Core Family Reference Manual Rev 1 E 4 Freescale Semiconductor Revision History...