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
Operands
-
RT
Target Register -
RA
Source Register
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
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.