addmeo

Add to Minus One Extended (Overflow)

addmeo RT,RA

Adds the contents of a register and a constant minus one, with optional overflow exception.

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

// r3 = r4 + CA - 1

Registers Altered

CR0, XER

Related

More in Base

Reference

Description

The sum (RA) + CA - 1 is placed into register RT. The carry bit (CA) is used in the calculation.

Operation

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

Extended Mnemonics

Extended Mnemonic Equivalent Instruction

Programming Note

When Rc=1 (dot form), CR0 is updated with the signed comparison of the result against zero (LT, GT, EQ) and the current SO bit from XER.