logoalt Hacker News

WalterBright • today at 6:34 PM • 3 replies • view on HN

I always thought the 8087 was way cool, but it never really caught on. Early versions of Win32 did not save the 8087 registers on a context switch. I called up some people at Microsoft to please not destroy the 8087, and they relented and preserved the registers.

I've always been proud to support the 8087 with my compilers, and am baffled why the numerics people ignore it.


Replies

downut • today at 9:57 PM

"numerics people ignored it"

I dunno Walter but as the first(?) IEEE754 implementation in a PC system it seemed like a pretty damn big deal to us people working in numerical algorithms. It was a big enough deal to me at the time (I was in graduate school) that I've kept my 8087 chip all my life and have it before me now. I see the old boy has lost a pin during the last move, dammit.

Chip has "3716150AA MALAY BEV 22" embossed on the pin side. Search gets me nothing.

jcranmer • today at 9:15 PM

I mean, the 8087 was the primary influence on IEEE 754, and hence all of modern floating-point, so in that sense, the numerics people don't ignore it.

The main problem with the x87 floating-point unit is that it only properly works on a weird 80-bit floating-point type that doesn't have the properties you expect of regular IEEE 754 floating-point types, thanks to the explicit integer bit. The design makes it hard to properly emulate the more common 32-bit and 64-bit single and double-precision floating-point arithmetic bit-equivalently, and this is compounded by many compilers' decision to spill floating-point registers incorrectly (they're spilled as 32-bit or 64-bit, not 80-bit), which makes the numerical results of your program effectively random. Also, the size of the 80-bit types isn't really conducive to vectorization, so the floating-point unit gets left behind as SIMD programming starts to become more important.

So what happens is that the x87 is essentially the last of the pre-IEEE 754 floating-point systems that's still hanging around. A lot of the features that would make it interesting in an environment where every vendor has a different floating-point system are now just vestigial weirdness in a world where everybody is following the same floating-point system, and not worth supporting.

➕ show 2 replies
WalterBright • today at 8:46 PM

That was win64, not win32. My mistake.