x86 Instruction Set Reference

FABS - Absolute Value

Opcode Mnemonic Description
D9 E1 FABS Replace ST with its absolute value.
Description

Clears the sign bit of ST(0) to create the absolute value of the operand. The following table shows the results obtained when creating the absolute value of various classes of numbers.

Results Obtained from FABS
ST(0) SourceST(0) Destination
-inf+inf
-F+F
-0+0
+0+0
+F+F
+inf+inf
NaNNaN
NOTE: F Means finite floating-point value.
Operation
ST(0) = GetAbsoluteValue(ST(0));
FPU flags affected

C1 Set to 0 if stack underflow occurred; otherwise, set to 0. C0, C2, C3 Undefined.

Floating-Point Exceptions
#ISStack underflow occurred.
Protected Mode Exceptions
#NMEM or TS in CR0 is set.
Real-Address Mode Exceptions
#NMEM or TS in CR0 is set.
Virtual-8086 Mode Exceptions
#NMEM or TS in CR0 is set.
Instruction Latency Throughput Execution Unit
CPUID0F3n/0F2n0F3n/0F2n0F2n
FABS3/21/1FP_MISC