Subject: GhostScript without an FPU
To: ADAMGOOD <ADAMGOOD@delphi.com>
From: Norman Mackenzie <101564.312@compuserve.com>
List: port-mac68k
Date: 10/25/1997 21:12:20
If you're still interested, I did eventually get GhostScript to work with
text.  Apart from the fscale problem (which should have been fixed in the
current sources) there was a problem with the <math.h> function ldexp(). 
On disassembling it, I found that it used the ftwotox instruction.  That's
not been implemented yet in the floating point emulation package.

I hacked together a very basic ftwotox emulation and got GhostScript to
work using the no fpu maths library.  (I didn't change the ghostscript
makefile's setting of FPU_TYPE = 1).  The strange thing was that I couldn't
see where the ftwotox instruction was coming from; ldexp is present in both
libm and libc and the sources seemed to use our old friend the fscale
instruction.  I sent in a problem report and it seems that ldexp had been
rewritten since the release of the version 1.2 libraries I'm using, so
current versions shouldn't have the problem.

If the fpu-less libm really is free from all 68881/2 instructions, my guess
is that the ldexp() was coming from libc.  It's possible therefore that a
current kernel and a recent libc will give you a working GhostScript.  I
can't guarantee this though, since I haven't tried it myself.

Norman