Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 1393

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

DIV—Unsigned Divide
Opcode
F6 /6
F7 /6
F7 /6
Description
Divides (unsigned) the value in the AL, AX, or EAX register (dividend) by the source
operand (divisor) and stores the result in the AX, DX:AX, or EDX:EAX registers. The
source operand can be a general-purpose register or a memory location. The action of
this instruction depends on the operand size, as shown in the following table:
Operand Size
Word/byte
Doubleword/word
Quadword/doubleword
Non-integral results are truncated (chopped) towards 0. The remainder is always less
than the divisor in magnitude. Overflow is indicated with the #DE (divide error)
exception rather than with the CF flag.
Operation
IF SRC = 0
THEN #DE; (* divide error *)
FI;
IF OpernadSize = 8 (* word/byte operation *)
THEN
temp  AX / SRC;
IF temp > FFH
FI;
ELSE
IF OpernadSize = 16 (* doubleword/word operation *)
Volume 4: Base IA-32 Instruction Reference
Instruction
Description
DIV r/m8
Unsigned divide AX by r/m8 ; AL
AH
DIV r/m16
Unsigned divide DX:AX by r/m16 ; AX
DX
DIV r/m32
Unsigned divide EDX:EAX by r/m32 doubleword;
EAX
Dividend
AX
DX:AX
EDX:EAX
THEN #DE; (* divide error *) ;
ELSE
AL  temp;
AH  AX MOD SRC;
THEN
temp  DX:AX / SRC;
IF temp > FFFFH
THEN #DE; (* divide error *) ;
ELSE
AX  temp;
DX  DX:AX MOD SRC;
FI;
Remainder
Remainder
Quotient, EDX
Remainder
Divisor
Quotient
r/m8
AL
r/m16
AX
r/m32
EAX
Quotient,
Quotient,
Maximum
Remainder
Quotient
AH
255
DX
65,535
32
EDX
2
 1
4:91

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents