EDIV

VAX11

 

EDIV       EXTENDED DIVIDE

 

Purpose

perform extended-precision division

Format

opcode divr.rl, divd.rq, quo.wl, rem.wl

Operation

quo ß divd/divr;

rem ß REM{dvid, divr};

Condition codes

N ß quo LSS 0;

Z ß que EQL 0;

V ß {integer overflow} OR {divr EQL 0};

C ß 0;

Exceptions

Integer overflow

Divide by zero

Opcodes

7B        EDIV   Extended Divide

Description

The dividend operand is divided by the divisor operand; the quotient operand is replaced by the quotient and the remainder operand is replaced by the remainder.

Notes

1. The division is performed such that the remainder operand (unless it is 0) has the same sign as the dividend operand.

2. On overflow, or if the divisor operand is 0, then the quotient operand is replaced by bits 31:0 of the dividend operand, and the remainder is replaced by 0.