adde
Add Extended
adde RT, RA, RB
Adds two registers plus the current Carry bit.
Details
The adde instruction adds the contents of two source registers RA and RB, along with the carry bit from a previous addition stored in the XER (CA) field, and places the result into the destination register RT. If the Rc flag is set to 1, it also updates the CR0 field of the Condition Register.
Pseudocode Operation
RT <- (RA) + (RB) + CA
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.
Example
adde r3, r4, r5
Encoding
Binary Layout
31
0
RT
6
RA
11
RB
16
OE
21
138
22
Rc
31
Operands
-
RT
Target Register -
RA
Source Register 1 -
RB
Source Register 2