background image

22-10 Vol. 3B

ARCHITECTURE COMPATIBILITY

22.18.6.3   Numeric Underflow Exception (#U)

When the underflow exception is masked on the 32-bit x87 FPUs, the underflow exception is signaled when the 
result is tiny and inexact (see Section 4.9.1.5, “Numeric Underflow Exception (#U)” in Intel® 64 and IA-32 Archi-
tectures Software Developer’s Manual, Volume 1
). When
 the underflow exception is unmasked and the instruction 
is supposed to store the result on the stack, the significand is rounded to the appropriate precision (according to 
the PC flag in the FPU control word, for those instructions controlled by PC, otherwise to extended precision), after 
adjusting the exponent.

22.18.6.4   Exception Precedence

There is no difference in the precedence of the denormal-operand exception on the 32-bit x87 FPUs, whether it be 
masked or not. When the denormal-operand exception is not masked on the 16-bit IA-32 math coprocessors, it 
takes precedence over all other exceptions. This difference causes no impact on existing software, but some 
unneeded normalization of denormalized operands is prevented on the Intel486 processor and Intel 387 math 
coprocessor.

22.18.6.5   CS and EIP For FPU Exceptions

On the Intel 32-bit x87 FPUs, the values from the CS and EIP registers saved for floating-point exceptions point to 
any prefixes that come before the floating-point instruction. On the 8087 math coprocessor, the saved CS and IP 
registers points to the floating-point instruction.

22.18.6.6   FPU Error Signals

The floating-point error signals to the P6 family, Pentium, and Intel486 processors do not pass through an interrupt 
controller; an INT# signal from an Intel 387, Intel 287 or 8087 math coprocessors does. If an 8086 processor uses 
another exception for the 8087 interrupt, both exception vectors should call the floating-point-error exception 
handler. Some instructions in a floating-point-error exception handler may need to be deleted if they use the inter-
rupt controller. The P6 family, Pentium, and Intel486 processors have signals that, with the addition of external 
logic, support reporting for emulation of the interrupt mechanism used in many personal computers.
On the P6 family, Pentium, and Intel486 processors, an undefined floating-point opcode will cause an invalid-
opcode exception (#UD, interrupt vector 6). Undefined floating-point opcodes, like legal floating-point opcodes, 
cause a device not available exception (#NM, interrupt vector 7) when either the TS or EM flag in control register 
CR0 is set. The P6 family, Pentium, and Intel486 processors do not check for floating-point error conditions on 
encountering an undefined floating-point opcode.

22.18.6.7   Assertion of the FERR# Pin

When using the MS-DOS compatibility mode for handing floating-point exceptions, the FERR# pin must be 
connected to an input to an external interrupt controller. An external interrupt is then generated when the FERR# 
output drives the input to the interrupt controller and the interrupt controller in turn drives the INTR pin on the 
processor. 
For the P6 family and Intel386 processors, an unmasked floating-point exception always causes the FERR# pin to 
be asserted upon completion of the instruction that caused the exception. For the Pentium and Intel486 proces-
sors, an unmasked floating-point exception may cause the FERR# pin to be asserted either at the end of the 
instruction causing the exception or immediately before execution of the next floating-point instruction. (Note that 
the next floating-point instruction would not be executed until the pending unmasked exception has been handled.) 
See Appendix D, â€śGuidelines for Writing x87 FPU Extension Handlers,” in the Intel® 64 and IA-32 Architectures 
Software Developer’s Manual, Volume 1
, for a 
complete description of the required mechanism for handling 
floating-point exceptions using the MS-DOS compatibility mode.
Using FERR# and IGNNE# to handle floating-point exception is deprecated by modern operating systems; this 
approach also limits newer processors to operate with one logical processor active.