Subject: Re: IEEE FP on VAX? [was Re: Trouble by compiling/configuring Perl5 on NetBSD-1.5]
To: Brian Chase <email@example.com>
From: Johnny Billquist <bqt@Update.UU.SE>
Date: 01/02/2001 21:39:50
On Tue, 2 Jan 2001, Brian Chase wrote:
> On Tue, 2 Jan 2001, Matt Thomas wrote:
> > At 01:02 PM 1/2/2001 -0500, Brian Chase wrote:
> > >Given that we already have VAX FP instructions, I think that VAX based
> > >IEEE support could be a lot faster in some cases than a purely integer
> > >math based version. You'd have to transform IEEE data into the VAX
> > >format, run a VAX FP instruction, and then transform the result back into
> > >IEEE. I know it's more difficult than just that, but you should be able
> > >leverage the existing FP support.
> > VAX FP does many thing differently than IEEE FP so you can't use it to
> > emulate IEEE FP.
> Support exisits for IEEE FP on the Intel and ARM32 ports right? The
> 386SX, 386DX, and 486SX processors don't support IEEE in hardware without
> a mathco. If they're emulating IEEE support using integer only
> operations, I don't see why we couldn't do the same... only we'd be able
> to add in VAX FP ops to speed things up a bit. How much mileage could we
> get out of doing the ops with the 128-bit H_float types, and then mapping
> the results to smaller 32-bit and 64-bit IEEE formats?
You can't do it like that. Like others stated: IEEE FP works different
than VAX FP, and it's not just a question of different number of bits used
for different fields, and such simple issues.
IEEE have -inf, +inf, NaN and I think some other possible value
represented by specific patterns. VAX FP have only NaN. Doing a
calculation that yield an error means you have no idea what the resulting
IEEE FP value should be, given the result of the VAX FP instruction.
You'll have to redo the calculation again, in some other way so that you
can find out what it really should be. Also, you might get an answer in
the VAX FP that cannot be converted straight off to IEEE, but instead
should yield an error. There are lots of pitfalls involved, and all of
them have to do with the error conditions, and values near them.
It's much easier if you just write the whole IEEE FP from scratch, using
integer arithmetic. Using another FP system to implement IEEE FP will give
you more headache than you need or want.
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: firstname.lastname@example.org || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol