Subtracts the value of a signed integer from the contents of a general-purpose register and places the result in a second general-purpose register.
si. | RT,RA,SINT |
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 into the target GPR RT. This instruction has the same effect as the ai. instruction used with a negative SINT. The assembler negates SINT and places this value (SI) in the machine instruction:
ai. RT,RA,-SINT
The si. instruction has one syntax form and can set the Carry Bit of the Fixed-Point Exception Register. This instruction also affects the Less Than (LT) zero, Greater Than (GT) zero, Equal To (EQ) zero, or Summary Overflow (SO) bit in Condition Register Field 0.
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 and Condition Register Field 0 to reflect the result of the operation:
# Assume GPR 4 contains 0xEFFF FFFF. si. 6,4,0xFFFFF800 # GPR 6 now contains 0xF000 07FF. # This instruction has the same effect as # ai. 6,4,-0xFFFFF800.
The addic. or ai. (Add Immediate Carrying and Record) instruction.
Fixed-Point Arithmetic Instructions.