EasyManua.ls Logo

Freescale Semiconductor PowerPC e500 Core - Compare Word Simplified Mnemonics; Condition Register Logical Simplified Mnemonics

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...
PowerPC e500 Core Family Reference Manual, Rev. 1
C-20 Freescale Semiconductor
Simplified Mnemonics for PowerPC Instructions
C.5 Compare Word Simplified Mnemonics
In compare word instructions, the L operand indicates a word (L = 0) or double-word (L = 1).
Simplified mnemonics in Table C-23 eliminate the L operand for word comparisons.
As with branch mnemonics, the crD field of a compare instruction can be omitted if CR0 is used,
as shown in examples 1 and 3 below. Otherwise, the target CR field must be specified as the first
operand. The following examples use word compare mnemonics:
1. Compare rA with immediate value 100 as signed 32-bit integers and place result in CR0.
cmpwi rA,100 equivalent to cmpi 0,0,rA,100
2. Same as (1), but place results in CR4.
cmpwi cr4,rA,100 equivalent to cmpi 4,0
,rA,100
3. Compare rA and rB as unsigned 32-bit integers and place result in CR0.
cmplw rA,rB equivalent to cmpl 0,0,rA,rB
C.6 Condition Register Logical Simplified Mnemonics
The CR logical instructions, shown in Table C-24, can be used to set, clear, copy, or invert a given
CR bit. Simplified mnemonics allow these operations to be coded easily. Note that the symbols
defined in Table C-8 can be used to identify the CR bit.
Table C-23. Word Compare Simplified Mnemonics
Operation Simplified Mnemonic Equivalent to:
Compare Word Immediate cmpwi crD,rA,SIMM cmpi crD,0,rA,SIMM
Compare Word cmpw crD,rA,rB cmp crD,0,rA,rB
Compare Logical Word Immediate cmplwi crD,rA,UIMM cmpli crD,0,rA,UIMM
Compare Logical Word cmplw crD,rA,rB cmpl crD,0,rA,rB
Table C-24. Condition Register Logical Simplified Mnemonics
Operation Simplified Mnemonic Equivalent to
Condition register set crset bx creqv bx,bx,bx
Condition register clear crclr bx crxor bx,bx,bx
Condition register move crmove bx,by cror bx,by,by
Condition register not crnot bx,by crnor bx,by,by

Table of Contents

Related product manuals