From owner-freebsd-current Thu Mar 26 09:02:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA15009 for freebsd-current-outgoing; Thu, 26 Mar 1998 09:02:00 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from helmholtz.salk.edu (helmholtz.salk.edu [198.202.70.34]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA14963 for ; Thu, 26 Mar 1998 09:01:40 -0800 (PST) (envelope-from bartol@salk.edu) Received: from dale.salk.edu (dale [198.202.70.112]) by helmholtz.salk.edu (8.7.5/8.7.3) with SMTP id JAA14616; Thu, 26 Mar 1998 09:01:18 -0800 (PST) Date: Thu, 26 Mar 1998 09:01:17 -0800 (PST) From: Tom Bartol To: John Polstra cc: bde@zeta.org.au, current@FreeBSD.ORG Subject: Re: gcc bug in -current!!! In-Reply-To: <199803261333.FAA19528@austin.polstra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I confirm that this patch fixes the symptoms that prompted my original posting regarding this bug. My random number generator now gives me the correct stream. Thanks!!! Tom On Thu, 26 Mar 1998, John Polstra wrote: > 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 > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message