addme.

Add to Minus One Extended

addme. RT,RA

Adds the contents of two registers and subtracts one, then updates the condition register.

Encoding

Binary Layout
31
0:5
RT
6:10
RA
11:15
00000
16:20
OE
21
234
22:30
Rc
31
 
Format XO-form
Opcode 0x7C0001D4
Extension Base

Operands

  • RT
    Target Register
  • RA
    Source Register

Example

addme. r3, r4, r5

Registers Altered

CR0, XER

Related

More in Base

Reference

Description

For addme., the sum of the contents of register RA and RB minus one is placed into register RT.

Operation

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

Programming Note

The addme. instruction adds two registers, subtracts one from the result, and stores it in a third register. It updates the CR0 and XER special registers with the arithmetic results. Ensure that the input registers RA and RB are correctly aligned for optimal performance. This instruction is available at user privilege level.