Re: i386 floating point expertise needed

Thor Lancelot Simon <[email protected]>
Newsgroups gmane.os.netbsd.ports.i386
Message-ID <[email protected]>
On Wed, Nov 29, 2017 at 06:54:27PM -0500, Terry Moore wrote:
> > We need someone with i386 floating point knowledge (and I mean, deep down
> > low, what every instruction is supposed to do, and how it is supposed to
> > be used, including all the surrounding support flags words and whatever)
> > to have a look at this, and work out what the problem is.
> > I have not been following, but I do know the 386 from years ago.
> 
> I used to have such knowledge. Unfortunately, I don't know Unix-style 
> 386 assembly, having gained that knowledge in the x86 commercial
> world; but I don't think that's needed.
> 
> The problem is that the 386 does computations with 80-bit numbers, not
> 64-bit.
> The compiler has evidently optimized out a store that would have forced the 
> truncation. 

If this is the cause, it should go away with gcc -ffloat-store.  This
should be easy to confirm...

I though GCC always stored both operands before a comparison.  I'm not
surprised the subtraction test, however, fails.

Thor
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.