addic
Add Immediate Carrying
addic RT,RA,SI
Adds an immediate to a register and updates the Carry bit.
Encoding
Binary Layout
12
0:5
RT
6:10
RA
11:15
SI
16:31
Operands
-
RT
Target Register -
RA
Source Register -
SI
Signed 16-bit Immediate
Example
addic r3, r4, 10
// r3 = r4 + 10 (Updates CA)
Registers Altered
XER, CR0Related
More in Base
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
The sum (RA) + SI is placed into register RT.
Operation
RT <- (RA) + EXTS(SI); CA <- Carry
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
| subic |
Programming Note
The `addic` instruction adds an immediate value to a register and sets the carry bit in the XER. It's commonly used for arithmetic operations where overflow detection is needed. Ensure that the immediate value fits within 16 bits, as it is sign-extended before addition. This instruction operates at user privilege level.