2.2.26 (2) DIVXS (W)
DIVXS (DIVide eXtend as Signed)
Divide Signed
Description
This instruction divides the contents of a 32-bit register ERd (destination register) by the contents
of a 16-bit register Rs (source register) and stores the result in the 32-bit register ERd. The
division is signed. The operation performed is 32 bits ÷ 16 bits
→
16-bit quotient and 16-bit
remainder. The quotient is placed in the lower 16 bits (Rd) of the 32-bit register ERd. The
remainder is placed in the upper 16 bits (Ed).
Valid results are not assured if division by zero is attempted or an overflow occurs. For
information on avoiding overflow, see DIVXS Instruction, Zero Divide, and Overflow.
Available Registers
ERd: ER0 to ER7
Rs:
R0 to R7, E0 to E7
ERd
Rs
ERd
Dividend
÷
Divisor
→
Remainder
Quotient
32 bits
16 bits
16 bits
16 bits
Operation
ERd ÷ Rs
→
ERd
Assembly-Language Format
DIVXS.W
Rs, ERd
Operand Size
Word
Condition Code
H: Previous value remains unchanged.
N: Set to 1 if the quotient is negative;
otherwise cleared to 0.
Z:
Set to 1 if the divisor is zero; otherwise
cleared to 0.
V: Previous value remains unchanged.
C: Previous value remains unchanged.
I
UI
H
U
N
Z
V
C
—
—
—
—
↕
↕
—
—
84