IBM SA14-2339-04 Personal Computer User Manual


 
Instruction Set 9-9
addi
Add Immediate
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.
Architecture Note
This instruction is part of the PowerPC User Instruction Set Architecture.
addi RT, RA, IM
14 RT RA IM
0 6 11 16 31
Table 9-3. 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