Subject: FPU emulation in current broken?
To: None <port-i386@netbsd.org>
From: Dave Huang <khym@bga.com>
List: port-i386
Date: 02/07/1999 19:38:18
I just upgraded my FPU-less 386 to a recent -current (Feb 5 or Feb 6),
and now FPU-using programs die with a bus error. For example "ps" works,
but "ps u" doesn't. ping and traceroute fail too.

I don't know if it's a new bug, or one uncovered by the new binutils, or
what... the problem seems to be "fnstsw %ax". gas assembles this as "66
df e0", i.e. "data16 fnstsw %ax". I haven't tried to figure out exactly
what the kernel does when it encounters that, but it looks like it's
treating it as a 2 byte long instruction instead of 3--the eip register
only increments by 2. The processor starts executing junk, then the
program dies. To get just "df e0" (no data16 prefix), gas wants "fnstsw
%eax".

So, from my cursory look, I'm guessing the fpu emulation doesn't handle
the extraneous prefix correctly...
-- 
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 23 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++