EMOD Instruction

Purpose:To perform accurate range of math function arguments
Format:opcode mulr.rx, mulrx.rb, muld.rx, int.wl fract.wx
Operation:int <- integer part of muld * (mulr,mulrx);
frac <- fractional part of muld * (mulr,mulrx);
Condition
Codes:
N <- fract LSS 0;
Z <- fract EQL 0;
V <- {Integer Overflow}
C <- 0;
Exceptions:Integer Overflow;
Floating underflow;
Reserved Operand (Floating Point)
Opcodes:
54EMODFExtended multiply and integerize Float
74EMODDExtended multiply and integerize Double
Description: The floating point multiplier extension operand (mulrx) is concatenated with the floating point multiplier (mulr) to gain 8 additional low order fraction bits. The multiplicand operand (muld) is multiplied by the extended multiplier. After multiplication, the integer portion is extracted and a 32 bit (EMODF) or 64 bit (EMODD) floating point number is formed from the fractional part of the product, by trucating extra bits. The multiplication is such that the result is equivalent to the exact product truncated to a fraction field of 32 bits (float) or 64 bits (double). Regarding the result as the sum of an integer and fraction of the same sign, the integer operand is replaced by the integer part of the result and the fraction by is replaced by the rounded fractional part of the result. The source operands, mulr, mulrx and muld are unaffected.
Notes:
1.
On a floating reserved operand fault, the integer and fraction operands are unaffected and the condition codes are unpredictable.
2.
On floating underflow, the integer and fraction operands are replaced with by 0.
3.
On integer overflow, the integer operand is replaced by the low order bits of the true result.
4.
Floating overflow is indicated by integer overflow; however, integer overflow is possible in the absence of floating overflow.