INSTRUCTION SET OVERVIEW
5.2.3.1
Add, Subtract, Multiply, Divide, Conditional Add, Conditional Subtract
These instructions perform add, subtract, multiply or divide operations on integers and ordinals:
addi
Add Integer
addo
Add Ordinal
ADD <cc>
conditional add
subi
Subtract Integer
subo
Subtract Ordinal
SUB<cc>
Conditional Subtract
muli
Multiply Integer
mulo
Multiply Ordinal
divi
Divide Integer
divo
Divide Ordinal
,
,
,
addi
ADDI<cc>
subi
SUBI<cc>
result is too large to fit in the 32-bit destination.
the divisor is zero.
5.2.3.2
Remainder and Modulo
These instructions divide one operand by another and retain the remainder of the operation:
remi
remainder integer
remo
remainder ordinal
modi
modulo integer
The difference between the remainder and modulo instructions lies in the sign of the result. For
and
, the result has the same sign as the dividend; for
remi
remo
as the divisor.
5-8
,
and
generate an integer-overflow fault when the
muli
divi
divi
and
divo
generate a zero-divide fault when
, the result has the same sign
modi