x87

x87 is a math-related instruction subset of the Intel x86 family line of processors. It is so called because initially such instructions were processed by an external coprocessor chip with a name ending in 87. Like other extensions to the basic processor instruction set, these instructions are not strictly needed to construct working programs, but provide hardware implementation of common mathematical tasks, allowing these tasks to be performed much faster. For example, the x87 instruction set includes instructions to calculate the sine or cosine of a value.

All Intel and AMD processors since the 80486DX have had these instructions built into the main CPU. The term 'x87' is still used to refer to that part of the instruction set that performs conventional floating point operations; compilers may use these instructions to make code that operates faster than if it used library calls to perform floating-point operations.

The x87 instructions are compatible with the IEEE-754 standard for floating-point. However, x87 does not perform operations according to strict IEEE-754 formats, since it uses wide registers internally. A given sequence of arithmetic operations may thus behave differently on a x87 and a processor implementing strict IEEE-754 formats.[1]

Starting from the Pentium 4, the SSE unit implements single-precision, then in later versions double-precision, IEEE-754 formats. The x87 unit is largely deprecated on the 64-bit x86-64 architecture and associated 64-bit implementations of operating systems such as Microsoft Windows, Mac OS X, Solaris, and Linux though it is still well supported for full compatibility with older applications.

原文地址:https://www.cnblogs.com/taoxu0903/p/1211293.html