addme.
Add to Minus One Extended
addme. RT,RA,RB
Adds the contents of two registers and subtracts one, then updates the condition register.
Details
For addme., the sum of the contents of register RA and RB minus one is placed into register RT.
Pseudocode 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.
Example
addme. r3, r4, r5
Encoding
Binary Layout
31
0
RT
6
RA
11
/
16
0
21
234
22
Rc
31
Operands
-
RT
Target General Purpose Register -
RA
Source General Purpose Register -
RB
Source General Purpose Register