addi
Add Immediate
PPC440x5 CPU Core User’s Manual Preliminary
Page 258 of 589
instrset.fm.
September 12, 2002
addi
Add Immediate
(RT) ← (RA|0) + EXTS(IM)
If the RA field is 0, the IM field, sign-extended to 32 bits, is placed into register RT.
If the RA field is nonzero, the sum of the contents of register RA and the contents of the IM field, sign-
extended to 32 bits, is placed into register RT.
Registers Altered
•RT
Programming Note
To place an immediate, sign-extended value into the GPR specified by RT, set RA = 0.
addi RT, RA, IM
14 RT RA IM
0 6 11 16 31
Table 9-4. Extended Mnemonics for addi
Mnemonic Operands Function
Other Registers
Altered
la
RT, D(RA)
Load address (RA ≠ 0); D is an offset from a base address that
is assumed to be (RA).
(RT) ← (RA) + EXTS(D)
Extended mnemonic for
addiRT,RA,D
li
RT, IM
Load immediate.
(RT) ← EXTS(IM)
Extended mnemonic for
addi RT,0,IM
subi
RT, RA, IM
Subtract EXTS(IM) from (RA|0).
Place result in RT.
Extended mnemonic for
addi RT,RA,−IM