add.

Add Record

add. RT,RA,RB

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

Encoding

Binary Layout
18
0:5
LI
6:29
AA
30
LK
31
 
Format XO-form
Opcode 0x7C000214
Extension Base

Operands

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

Example

add. r3, r4, r5

Registers Altered

CR0, XER

Related

More in Base

Reference

Description

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

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.