Calculates an address from an offset and a base address and places the result in a general-purpose register.
See "Extended Mnemonics of Fixed-Point Arithmetic Instructions" and "Extended Mnemonics of Fixed-Point Load Instructions" for more information.
The addi and cal instructions place the sum of the contents of general-purpose register (GPR) RA and the 16-bit two's complement integer SI or D, sign-extended to 32 bits, into the target GPR RT. If GPR RA is GPR 0, then SI or D is stored into the target GPR RT.
The addi and cal instructions have one syntax form and do not affect Condition Register Field 0 or the Fixed-Point Exception Register.
|RT||Specifies target general-purpose register where result of operation is stored.|
|RA||Specifies source general-purpose register for operation.|
|D||Specifies 16-bit two's complement integer sign extended to 32 bits.|
|SI||Specifies 16-bit signed integer for operation.|
The following code calculates an address or contents with an offset of 0xFFFF 8FF0 from the contents of GPR 5 and stores the result in GPR 4:
# Assume GPR 5 contains 0x0000 0900. addi 4,0xFFFF8FF0(5) # GPR 4 now contains 0xFFFF 98F0.
Fixed-Point Address Computation Instructions.