diff options
author | rnordier <rnordier@FreeBSD.org> | 1998-10-21 17:10:49 +0000 |
---|---|---|
committer | rnordier <rnordier@FreeBSD.org> | 1998-10-21 17:10:49 +0000 |
commit | 34b1dd600500be6ecb21627b31c1779c0e7fb1a9 (patch) | |
tree | 9598418a5e5139c9e6cf90cc388a604622d405b2 /sys/i386 | |
parent | 74b341f8c8d80283094964782b353a138b8207ca (diff) | |
download | FreeBSD-src-34b1dd600500be6ecb21627b31c1779c0e7fb1a9.zip FreeBSD-src-34b1dd600500be6ecb21627b31c1779c0e7fb1a9.tar.gz |
Get things limping along again for the 80386 and friends. The
ELF assembler emits a redundant operand-size prefix for the
fnstsw %ax instruction, and this stops the show for 3.0-RELEASE.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/math_emulate.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/i386/i386/math_emulate.c b/sys/i386/i386/math_emulate.c index 743442b..0e80743 100644 --- a/sys/i386/i386/math_emulate.c +++ b/sys/i386/i386/math_emulate.c @@ -6,7 +6,7 @@ * [expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj] * * from: 386BSD 0.1 - * $Id: math_emulate.c,v 1.28 1998/10/16 03:54:59 peter Exp $ + * $Id: math_emulate.c,v 1.29 1998/10/18 07:40:29 peter Exp $ */ /* @@ -117,7 +117,10 @@ math_emulate(struct trapframe * info) (u_long)oldeip); panic("?Math emulation needed in kernel?"); } - code = get_fs_word((unsigned short *) oldeip); + /* completely ignore an operand-size prefix */ + if (get_fs_byte((char *) info->tf_eip) == 0x66) + info->tf_eip++; + code = get_fs_word((unsigned short *) info->tf_eip); bswapw(code); code &= 0x7ff; I387.fip = oldeip; |