2-38 PPC405 Core 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 2-10 and “Fixed Point Exception Register (XER)” on page 2-7 for more
information.
Table 2-13 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-13. 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][.]