FMOD
Operation
Computes the destination modulo the source using a quotient truncated toward zero.
Assembler Syntax
FMOD.{S|D}(z) <ea>(e), Fn(d)
FMOD.{S|D}(z) Fn(s), Fn(d)
Privilege
Unprivileged
Required CPUID flags
FP
Repeat eligibility
REP eligible
Computes the IEEE-style floating-point modulus defined by a quotient rounded toward zero and writes the selected-format remainder.
After DAZ processing, let \(x\) be the original destination and \(y\) the source. For finite valid operands, choose \(q\) as \(x/y\) truncated toward zero and compute $\(r = x - qy\)$ with exact intermediate arithmetic. A zero result has the sign of \(x\).
A signaling NaN generates NV; a NaN input produces the selected quiet NaN. Infinite \(x\) or zero \(y\) generates NV and produces the architectural default quiet NaN. Infinite \(y\) with finite \(x\) returns \(x\). An enabled floating-point exception condition raises the FLOATING_POINT_EXCEPTION architectural event before the destination write.
2.75in
Encodings
FMOD.{S|D}(z) <ea>(e), Fn(d)
Format: Instruction format for FMOD.{S|D}(z) <ea>(e), Fn(d)
2.75in FMOD.{S|D}(z) Fn(s), Fn(d)
Format: Instruction format for FMOD.{S|D}(z) Fn(s), Fn(d)