From owner-freebsd-current Thu Mar 26 05:33:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id FAA05246 for freebsd-current-outgoing; Thu, 26 Mar 1998 05:33:48 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA05233 for ; Thu, 26 Mar 1998 05:33:44 -0800 (PST) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id FAA19528; Thu, 26 Mar 1998 05:33:39 -0800 (PST) (envelope-from jdp) Message-Id: <199803261333.FAA19528@austin.polstra.com> To: bde@zeta.org.au Subject: Re: gcc bug in -current!!! In-Reply-To: <199803250712.SAA28158@godzilla.zeta.org.au> References: <199803250712.SAA28158@godzilla.zeta.org.au> Organization: Polstra & Co., Seattle, WA Cc: current@FreeBSD.ORG Date: Thu, 26 Mar 1998 05:33:39 -0800 From: John Polstra Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <199803250712.SAA28158@godzilla.zeta.org.au>, Bruce Evans wrote: > >I confirm this bug present. To narrow down search path, even cc from Mar 6 > >works fine. Here is diff from assembler code generated by old and new cc > >(without optimization), old first: as we see, main change is that "fildq" > >replaced with "fildll". > > gas doesn't understand fildll (it silently (:-() converts it to fildl). This patch to "as" fixes the test case, and I think it's correct. This is not to say that the compiler shouldn't be fixed. But the assembler should be fixed too, and that's easier. :-) I haven't done a make world with this, or any large-scale testing at all. (My -current system is in a bit of a mess at the moment.) Does anybody see a problem with it? Index: i386.h =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/as/opcode/i386.h,v retrieving revision 1.8 diff -u -r1.8 i386.h --- i386.h 1997/07/15 07:56:53 1.8 +++ i386.h 1998/03/26 13:15:44 @@ -472,6 +472,7 @@ {"fldl", 1, 0xdd, 0, Modrm, Mem, 0, 0}, /* %st0 <-- mem double */ {"fldl", 1, 0xd9c0, _, ShortForm, FloatReg, 0, 0}, /* register */ {"filds", 1, 0xdf, 0, Modrm, Mem, 0, 0}, /* %st0 <-- mem dword */ +{"fildll", 1, 0xdf, 5, Modrm, Mem, 0, 0}, /* %st0 <-- mem qword */ {"fildq", 1, 0xdf, 5, Modrm, Mem, 0, 0}, /* %st0 <-- mem qword */ {"fldt", 1, 0xdb, 5, Modrm, Mem, 0, 0}, /* %st0 <-- mem efloat */ {"fbld", 1, 0xdf, 4, Modrm, Mem, 0, 0}, /* %st0 <-- mem bcd */ @@ -491,6 +492,7 @@ {"fstpl", 1, 0xdd, 3, Modrm, Mem, 0, 0}, /* %st0 --> mem double */ {"fstpl", 1, 0xddd8, _, ShortForm, FloatReg, 0, 0}, /* register */ {"fistps", 1, 0xdf, 3, Modrm, Mem, 0, 0}, /* %st0 --> mem dword */ +{"fistpll", 1, 0xdf, 7, Modrm, Mem, 0, 0}, /* %st0 --> mem qword */ {"fistpq", 1, 0xdf, 7, Modrm, Mem, 0, 0}, /* %st0 --> mem qword */ {"fstpt", 1, 0xdb, 7, Modrm, Mem, 0, 0}, /* %st0 --> mem efloat */ {"fbstp", 1, 0xdf, 6, Modrm, Mem, 0, 0}, /* %st0 --> mem bcd */ John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message