ia-32_volume1_basic-arch

Conditions that cause a floating point exception to

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e-by-zero exception is to set the ZE flag and return an infinity signed with the exclusive OR of the sign of the operands. If the divide-by-zero exception is not masked, the ZE flag is set, a software exception handler is invoked, and the operands remain unaltered. See the following sections for information regarding the divide-by-zero exception when detected while executing x87 FPU or SSE/SSE2 instructions: x87 FPU; Section 8.5.3, "Divide-By-Zero Exception (#Z)" SIMD floating-point exceptions; Section 11.5.2.3, "Divide-By-Zero Exception (#Z)" 4.9.1.4 Numeric Overflow Exception (#O) The processor reports a floating-point numeric overflow exception whenever the rounded result of an instruction exceeds the largest allowable finite value that will fit into the destination operand. Table 4-9 shows the threshold range for numeric overflow for each of the floating-point formats; overflow occurs when a rounded result falls at or outside this threshold range. Vol. 1 4-27 DATA TYPES Table 4-9. Numeric Overflow Thresholds Floating-Point Format Single Precision Double Precision Double Extended Precision Overflow Thresholds | x | 1.0 2128 | x | 1.0 21024 | x | 1.0 216384 When a numeric-overflow exception occurs and the exception is masked, the processor sets the OE flag and returns one of the values shown in Table 4-10, according to the current rounding mode. See Section 4.8.4, "Rounding." When numeric overflow occurs and the numeric-overflow exception is not masked, the OE flag is set, a software exception handler is invoked, and the source and destination operands either remain unchanged or a biased result is stored in the destination operand (depending whether the overflow exception was generated during an SSE/SSE2/SSE3 floating-point operation or an x87 FPU operation). Table 4-10. Masked Responses to Numeric Overflow Rounding Mode To nearest Toward Toward + Toward zero Sign of True Result + + + + Result + Largest finite positive number + Largest finite negative number Largest finite positive number Largest finite negative number See the following sections for information regarding the numeric overflow exception when detected while executing x87 FPU instructions or while executing SSE/SSE2/SSE3 instructions: x87 FPU; Section 8.5.4, "Numeric Overflow Exception (#O)" SIMD floating-point exceptions; Section 11.5.2.4, "Numeric Overflow Exception (#O)" 4.9.1.5 Numeric Underflow Exception (#U) The processor detects a floating-point numeric underflow condition whenever the result of rounding with unbounded exponent (taking into account precision control for x87) is tiny; that is, less than the smallest possible normalized, finite value that will fit into the destination operand. Table 4-11 shows the threshold range for 4-28 Vol. 1 DATA TYPES numeric underflow for each of the floating-point formats (assuming normalized results); underflow occurs when a rounded result falls strictly within the threshold range. The abi...
View Full Document

Ask a homework question - tutors are online