2.2.27 (2) DIVXU (W)
DIVXU (DIVide eXtend as Unsigned)
Divide
Operation
ERd ÷ Rs
→
ERd
Assembly-Language Format
DIVXU.W
Rs, ERd
Operand Size
Word
Condition Code
H: Previous value remains unchanged.
N: Set to 1 if the divisor 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
—
—
—
—
↕
↕
—
—
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 unsigned. 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 8 bits of (Ed).
Valid results are not assured if division by zero is attempted or an overflow occurs. For
information on avoiding overflow, see DIVXU Instruction, Zero Divide, and Overflow.
Available Registers
ERd: ER0 to ER7
Rs:
R0 to R7, E0 to E7
Operand Format and Number of States Required for Execution
Notes
ERd
Rs
ERd
Dividend
÷
Divisor
→
Remainder
Quotient
32 bits
16 bits
16 bits
16 bits
Instruction Format
1st byte
2nd byte
3rd byte
4th byte
Register direct
DIVXU.W
Rs, ERd
5
3
rs
0 ERd
22
No. of
States
Addressing
Mode
Mnemonic
Operands
91