AMCC Proprietary 63
Revision 1.02 - September 10, 2007
PPC405 Processor
Preliminary User’s Manual
2.11.3 Arithmetic Instructions
Arithmetic operations are performed on integer operands stored in GPRs. Instructions that perform operations on
two operands are defined in a three-operand format; an operation is performed on the operands, which are stored
in two GPRs. The result is placed in a third, operand, which is stored in a GPR. Instructions that perform operations
on one operand are defined using a two-operand format; the operation is performed on the operand in a GPR and
the result is placed in another GPR. Several instructions also have immediate formats in which an operand is
contained in a field in the instruction word.
Most arithmetic instructions have versions that can update CR[CR0] and XER[SO, OV], based on the result of the
instruction. Some arithmetic instructions also update XER[CA] implicitly. See Condition Register (CR) on page 39
and Fixed Point Exception Register (XER) on page 37 for more information.
Table 2-15 lists the PPC405 arithmetic instructions. In the table, the syntax [o] indicates that an instruction has an
“o” form that updates XER[SO,OV], and a “non-o” form. The syntax [.] indicates that the instruction has a “record”
form that updates CR[CR0], and a “non-record” form.
Table 2-16 lists additional arithmetic instructions for multiply-accumulate and multiply halfword operations. In the
table, the syntax [o] indicates that an instruction has an “o” form that updates XER[SO,OV], and a “non-o” form.
The syntax [.] indicates that the instruction has a “record” form that updates CR[CR0], and a “non-record” form.
Table 2-15. Arithmetic Instructions
Add Subtract Multiply Divide Negate
add[o][.]
addc[o][.]
adde[o][.]
addi
addic
[.]
addis
addme
[o][.]
addze[o][.]
subf[o][.]
subfc[o][.]
subfe[o][.]
subfic
subfme
[o][.]
subfze[o][.]
mulhw[.]
mulhwu[.]
mulli
mullw
[o][.]
divw[o][.]
divwu[o][.]
neg[o][.]
Table 2-16. Multiply-Accumulate and Multiply Halfword Instructions
Multiply-Accumulate Negative-Multiply- Accumulate Multiply Halfword
macchw[o][.]
macchws[o][.]
macchwsu[o][.]
macchwu[o][.]
machhw[o][.]
machhws[o][.]
machhwsu[o][.]
machhwu[o][.]
maclhw[o][.]
maclhws[o][.]
maclhwsu[o][.]
maclhwu[o][.]
nmacchw[o][.]
nmacchws[o][.]
nmachhw[o][.]
nmachhws[o][.]
nmaclhw[o][.]
nmaclhws[o][.]
mulchw[.]
mulchwu[.]
mulhhw[.]
mulhhwu[.]
mullhw[.]
mullhwu[.]