Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 1998 06:01:38 -0700
From:      Robert Nordier <rnordier@FreeBSD.ORG>
To:        Stephen McKay <syssgm@dtir.qld.gov.au>, John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: 3.0-R on a amd386dx/40
Message-ID:  <19981021060138.A10093@freebsd.org>
In-Reply-To: <199810211020.UAA09162@nymph.dtir.qld.gov.au>; from Stephen McKay on Wed, Oct 21, 1998 at 08:20:59PM %2B1000
References:  <19981021004537.00515@hydrogen.nike.efn.org> <199810210847.SAA06623@nymph.dtir.qld.gov.au> <19981021022458.12727@hydrogen.nike.efn.org> <199810210933.TAA07949@nymph.dtir.qld.gov.au> <19981021023848.61590@hydrogen.nike.efn.org> <199810210955.TAA08445@nymph.dtir.qld.gov.au> <19981021030658.41265@hydrogen.nike.efn.org> <199810211020.UAA09162@nymph.dtir.qld.gov.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 21, 1998 at 08:20:59PM +1000, Stephen McKay wrote:
> On Wednesday, 21st October 1998, John-Mark Gurney wrote:
> 
> >Stephen McKay scribbled this message on Oct 21:
> >> Try "awk", for example.  It uses floating point, and I think it will die.
> >> "df" uses double.  "newfs" uses float.  "ls" doesn't, and it works.  It's
> >> a floating point problem, or I'll eat my copy of the Pointy Hat!
> >> 
> >> I still think the "npx" lines from boot are relevant.
> >
> >ok, here are the lines:
> >npx0 on motherboard
> >npx0: 387 emulator
> >
> >these are the lines from a 2.2.6-R system that has problems running
> >the binaries...
> 
> I assume they are the same when booting 3.0-R?  I am still uncomfortable
> with the idea of debugging a (possibly complex) problem by running 3.0
> binaries on a 2.2.x system.  It's not designed to work.  Maybe it does.
> Maybe it doesn't.  I'd rather you reported the behaviour of 3.0 binaries
> under a 3.0 kernel and 2.2.6 binaries under 2.2.6 kernel.  Call me
> old fashioned. ;-)
> 
> >I can't see how newfs would fail (elf) but systat (a.out)
> >would work perfectly fine under the same kernel if the emulator was
> >broken...

Because not just the object format is different: different toolchain
as well.
> 
> Well, I kinda agree.  Bummer.  "The signs are clear, but point into the
> darkness", or some such.
> 
> >oh, and fsck (a.out), newfs (a.out) and df (a.out) also
> >work perfectly fine...
> 
> But, awk (elf) fails?  And say, date (elf) works?  That would point at FP
> probs even if, somehow, awk (a.out) still works.
> 
> And now Robert Nordier thinks FP is involved.  I hope he can do better
> than me, because I think I'm going back to the shallow end of the pool.
>


The problem is that the ELF assembler is emitting an operand-size
prefix for the i387 fnstsw instruction: 0x66 0xdf 0xe0 rather than
just 0xdf 0xe0 (as was the case for a.out).

The default FP emulator isn't expecting  operand-size prefixes, and 
adjusts the eip register by 2 instead of 3.

--
Robert Nordier

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981021060138.A10093>