Why do you need a 387 to run X11R3?

Ed Hall edhall at rand.org
Mon Mar 12 18:00:37 AEST 1990


In article <4.523N2ggpc2 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>In article <20203 at nuchat.UUCP> steve at 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 at rand.org



More information about the Comp.unix.i386 mailing list