Chapter 2. Programming Model
2-43
Instruction Set Summary
Although there is no Subtract Immediate instruction, its effect can be achieved by using an
addi
instruction with the immediate operand negated. SimpliTed mnemonics are provided
that include this negation. The
subf
instructions subtract the second operand (
r
A) from the
third operand (
r
B). SimpliTed 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 overow
enable bit (OE) or the carry bit (CA) can either execute these instructions slowly or prevent
execution of the subsequent instruction until the operation completes.
Chapter 6,
òInstruction Timing,ó describes how the MPC7400 handles CR dependencies. The
summary overow bit (SO) and overow bit (OV) in the XER register are set to reect an
overow 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
r
A with either the zero-extended value of the UIMM operand, the sign-extended value of
the SIMM operand, or the contents of
r
B. The comparison is signed for the
cmpi
and
cmp
instructions, and unsigned for the
cmpli
and
cmpl
instructions. Table 2-20 summarizes the
integer compare instructions.
Subtract from Immediate Carrying
subTc
r
D
,r
A,SIMM
Add Carrying
addc
(
addc. addco addco.
)
r
D
,r
A
,r
B
Subtract from Carrying
subfc
(
subfc. subfco subfco.
)
r
D
,r
A
,r
B
Add Extended
adde
(
adde. addeo addeo.
)
r
D
,r
A
,r
B
Subtract from Extended
subfe
(
subfe. subfeo subfeo.
)
r
D
,r
A
,r
B
Add to Minus One Extended
addme
(
addme. addmeo addmeo.
)
r
D
,r
A
Subtract from Minus One Extended
subfme
(
subfme. subfmeo subfmeo.
)
r
D
,r
A
Add to Zero Extended
addze
(
addze. addzeo addzeo.
)
r
D
,r
A
Subtract from Zero Extended
subfze
(
subfze. subfzeo subfzeo.
)
r
D
,r
A
Negate
neg
(
neg. nego nego.
)
r
D
,r
A
Multiply Low Immediate
mulli
r
D
,r
A,SIMM
Multiply Low
mullw
(
mullw. mullwo mullwo.
)
r
D
,r
A
,r
B
Multiply High Word
mulhw
(
mulhw.
)
r
D
,r
A
,r
B
Multiply High Word Unsigned
mulhwu
(
mulhwu.
)
r
D
,r
A
,r
B
Divide Word
divw
(
divw. divwo divwo.
)
r
D
,r
A
,r
B
Divide Word Unsigned
divwu divwu. divwuo divwuo.
r
D
,r
A
,r
B
Table 2-19. Integer Arithmetic Instructions (Continued)
Name
Mnemonic
Syntax