Xref: utzoo comp.unix.i386:3511 comp.windows.x:19723 Path: utzoo!attcan!uunet!mcsun!sunic!uupsi!rpi!brutus.cs.uiuc.edu!usc!randvax!edhall From: edhall@rand.org (Ed Hall) Newsgroups: comp.unix.i386,comp.windows.x Subject: Re: Why do you need a 387 to run X11R3? Keywords: X, 80387 Message-ID: <1990Mar12.080037.6227@rand.org> Date: 12 Mar 90 08:00:37 GMT References: <9868@batcomputer.tn.cornell.edu> <20203@nuchat.UUCP> <4.523N2ggpc2@ficc.uu.net> Sender: news@rand.org Reply-To: edhall@ives.UUCP (Ed Hall) Organization: The RAND Corporation, Santa Monica, CA Lines: 38 In article <4.523N2ggpc2@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >In article <20203@nuchat.UUCP> steve@nuchat.UUCP (Steve Nuchia) writes: >> When I cut my teeth, unix systems without FP hardware did the >> emulation thing in library routines that were 10 to mayby >> 100 time slower than hardware, so a program that would spend >> 10% of its time doing FP would slow down by less than ten times. > >I'm moderately sure that Version 7 UNIX on the PDP-11 trapped an illegal >instruction and emulated it, just like the 80386 UNIXes do. It might be that >the PDP-11 was just quicker at handling the fault. I'm *sure* that the PDP-11 >instructions were easier to parse than the 80386 ones. :->. Yes, V6 & V7 used illegal instruction traps to emulate floating-point instructions. It was dog slow, too. Simply printing a floating point value could take tens of milliseconds (one FP division and subtraction per digit). The signal mechanism was none too fast for Unix V6 & V7, making a slow task even slower. But I'll agree with the original poster that '87 emulators seem even worse. [Note that '87, '287 & '387s are pretty similar from an instruction set perspective, so I'll just use the term '87.] There is a reason why '87 emulation is slower, however, and it's not just the arcane instruction format. Internally, the '87 does all operations in 80-bit extended floating-point format. This is true even if the source and/or destination of a calculation is only 32-bit (single-precision)! As you might guess, all these bits can make emulation REAL SLOW. Also, operations need to do appropriate things with infinity, NaN, indefinite, and denormals--things PDP-11 FP units (or at least their emulators) never dreamed of. So, if you do any floating point whatever, save up your lunch money and buy yourself an '87. If you do a LOT of floating point, get a Weitek and a good compiler for it--even the 387 is a bit of a wimp, dispite the fact that it is a few hundred times better than an emulator. -Ed Hall edhall@rand.org