20 Ocak 2020 Pazartesi

X87 FPU - Retrocomputing

Giriş
Açıklaması şöyle. Yani x86 üzerinde çalışan 32 bit uygulamalarda bu FPU kullanılıyor.
On x64, the SSE2 FPU is used and on x86 the x87 FPU is used.
Aslında bu FPU hemen hemen tarih olmuş durumda. Açıklaması şöyle.
The Floating point unit (FPU) x87 is seen as outdated and slow in comparison to modern CPU extensions. SSE2 does not support 80-bit, hence the compiler's choice of 64-bit precision.

On 32-bit x86 architecture, since all CPUs don't have SSE2 yet, Microsoft still uses the floating point unit (FPU) x87 unless the compiler switch /arch:SSE2 is given.
İlk başa bu FPU ayrı bir sockete sahip bir işlemciydi. Açıklaması şöyle
It is not operated as an I/O device (using address space) but snoops the CPU execution to intercept FPU instructions and takes over bus control to access memory.
Bu FPU bir zaman sonra ayrı bir donanım olmaktan çıktı. Açıklaması şöyle.
Early in the x86's history, the floating point capability was a separate chip, it was integrated in the CPU beginning with 80486DX.
FPU 80 Bit Kullanır
X87'deki FPU 80 bit. Açıklaması şöyle.
The x87 FPU is notable for using an internal 80-bit precision mode, which often leads to unexpected and unreproducible results across compilers and machines.
Açıklaması şöyle.
80-bit extended precision has 15 bits of exponent and 64 bits of mantissa, while a standard 64-bit double has 11 bits of exponent and 53 bits of mantissa
Bu Durumu Hata Olarak Görenler Var
Açıklaması şöyle.
The 8087 Floating Point Unit chip design was Intel's billion dollar mistake.
FPU Programlama
Bu FPU çeşitli uzunluklarda (64 veya 80 bit) çalışmak üzere programlanabiliyor. Açıklaması şöyle
It is possible (although not advised) to change the x87 precision to be the same as the SSE2 precision (i.e., use lower precision).
long double C Tipi
C derleyicisi 32 bit x86 modunda derliyorsa bu FPU'yu kullanan bir tip sunuyor. Açıklaması şöyle.


For example, the C math library has had full support for long double, which on x87 was 80 bits wide, since C99. Previous versions of the standard library supported only the double type. Conforming C and C++ compilers also perform long double math if you give the operations a long double argument. (Recall that, in C, 1.0/3.0 divides a double by another double, producing a double-precision result, and to get long double precision, you would write 1.0L/3.0L.)

Hiç yorum yok:

Yorum Gönder