add.

Add Record

add. RT,RA,RB

Adds the contents of two registers and updates the condition register.

Details

For add., the sum of the contents of register RA and RB is placed into register RT.

Pseudocode Operation

if 'add.' then
    RT <- (RA) + (RB)

Programming Note

The add. instruction adds the values in registers RA and RB, storing the result in RT. It updates the CR0 and XER special registers to reflect overflow and carry conditions. Ensure that the operands are correctly aligned for optimal performance.

Example

add. r3, r4, r5

Encoding

Binary Layout
18
0
LI
6
AA
30
LK
31
 
Format XO-form
Opcode 0x7C000215
Extension Base
Registers Altered CR0, XER

Operands

  • RT
    Target General Purpose Register
  • RA
    Source General Purpose Register
  • RB
    Source General Purpose Register