[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

si (Subtract Immediate) Instruction


Subtracts the value of a signed integer from the contents of a general-purpose register and places the result in a general-purpose register.




The si instruction subtracts the 16-bit signed integer specified by the SINT parameter from the contents of general-purpose register (GPR) RA and stores the result in the target GPR RT. This instruction has the same effect as the ai instruction used with a negative SINT value. The assembler negates SINT and places this value (SI) in the machine instruction:


The si instruction has one syntax form and can set the Carry Bit of the Fixed-Point Exception Register; it never affects Condition Register Field 0.


RT Specifies target general-purpose register for operation.
RA Specifies source general-purpose register for operation.
SINT Specifies 16-bit signed integer for operation.
SI Specifies the negative of the SINT value.


The following code subtracts 0xFFFF F800 from the contents of GPR 4, stores the result in GPR 6, and sets the Carry bit in the Fixed-Point Exception Register to reflect the result of the operation:

# Assume GPR 4 contains 0x0000 0000
si 6,4,0xFFFFF800
# GPR 6 now contains 0x0000 0800
# This instruction has the same effect as
#     ai 6,4,-0xFFFFF800.

Related Information

The addic or ai (Add Immediate Carrying) instruction.

Branch Processor.

Fixed-Point Arithmetic Instructions.

[ Previous | Next | Contents | Home | Search ]