Integer Compare Instmctions - Motorola MPC750 User Manual

Risc
Hide thumbs Also See for MPC750:
Table of Contents

Advertisement

Table 2-22. Integer Arithmetic Instructions (Continued)
Name
Mnemonic
Syntax
Multiply Low
mullw (mullw. mullwo mullwo.)
rD,rA,rB
Multiply High Word
mulhw (mulhw.)
rD,rA,rB
Multiply High Word Unsigned
mulhwu (mulhwu.)
rD,rA,rB
Divide Word
divw (divw. divwo divwo.)
rD,rA,rB
Divide Word Unsigned
divwu divwu. divwuo divwuo.
rD,rA,rB
Although there is no Subtract Immediate instruction, its effect can be achieved by using an
addi instruction with the immediate operand negated. Simplified mnemonics are provided
that include this negation. The subfinstructions subtract the second operand (rA) from the
third operand (rB). Simplified mnemonics are provided in which the third operand is
subtracted from the second operand. See Appendix F, "Simplified Mnemonics," in The
Programming Environments Manual for examples.
The UISA states that an implementation that executes instructions that set the overflow
enable bit (OE) or the carry bit (CA) may either execute these instructions slowly or prevent
execution of the subsequent instruction until the operation completes. Chapter 6,
"Instruction Timing," describes how the MPC750 handles CR dependencies. The summary
overflow bit (SO) and overflow bit (OV) in the integer exception register are set to reflect
an overflow condition of a 32-bit result. This can happen only when OE
=
1.
2.3.4.1.2 Integer Compare Instructions
The integer compare instructions algebraically or logically compare the contents of register
rA with either the zero-extended value of the UIMM operand, the sign-extended value of
the SIMM operand, or the contents of register rB. The comparison is signed for the cmpi
and cmp instructions, and unsigned for the cmpli and cmpl instructions. Table 2-23
summarizes the integer compare instructions.
Table 2-23. Integer Compare Instructions
Name
Mnemonic
Syntax
Compare Immediate
cmpi
crfD,L,rA,SIMM
Compare
cmp
crfD,L,rA,rB
Compare Logical Immediate
cmpli
crfD,L,rA,UIMM
Compare Logical
cmpl
crfD,L,rA,rB
The crfD operand can be omitted if the result of the comparison is to be placed in CRO.
Otherwise the target CR field must be specified in crfD, using an explicit field number.
For information on simplified mnemonics for the integer compare instructions see
Appendix F, "Simplified Mnemonics," in The Programming Environments Manual.
Chapter 2. MPC750 Processor Programming Model
2-39

Advertisement

Table of Contents
loading

Table of Contents