x87


x87 is a math-related instruction subset of the x86 architecture of processors. It is so called because initially such instructions were processed by an external coprocessor chip with a number 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]

The x87 does not organise its registers as a register array, as most computer architectures do, but as a register stack, meaning that only the top two registers are available for operations, and that accessing the other registers requires stack-manipulation operations. While convenient for human programmers, this organisation makes it difficult for compilers to schedule x87 code effectively.

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

Contents

List of x87 generations

References

  1. ^ David Monniaux, The pitfalls of verifying floating-point computations, to appear in ACM TOPLAS
  • Intel Corp., IA-32 Intel Architecture Software Developer's Manual Volume 1: Basic Architecture, order number 253665-017

See also

External links







stock | retire | vm
Why are we here?
All text is available under the terms of the GNU Free Documentation License
This page is cache of Wikipedia. History