Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Sep 2002 15:43:44 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        "David O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Mikhail Teterin <mi+mx@aldan.algebra.com>, Mike Barcroft <mike@FreeBSD.org>
Subject:   Re: cvs commit: src/contrib/gcc toplev.c
Message-ID:  <XFMail.20020923154344.jhb@FreeBSD.org>
In-Reply-To: <20020923192518.GA78132@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 23-Sep-2002 David O'Brien wrote:
> On Mon, Sep 23, 2002 at 02:30:11PM -0400, Mike Barcroft wrote:
>> Mikhail Teterin <mi+mx@aldan.algebra.com> writes:
>> > On Sunday 22 September 2002 03:26 am, David E. O'Brien wrote:
>> > = obrien      2002/09/22 00:26:39 PDT
>> > = 
>> > =   Modified files:
>> > =     contrib/gcc          toplev.c 
>> > =   Log:
>> > =   Turn off the "-O2 flag TRIGGERS KNOWN OPTIMIZER BUGS" warning.
>> > 
>> > What about x86 (and -current)? Is it safe to use -O2?
>> 
>> Not yet.  See PR 40209.
> 
> Not being able to use -O2 is due to a code bug in FreeBSD's code.  Not
> due to GCC optimizer bugs.  I feel it is safe to give -O2 a try on
> people's own code now.

Is it due to stuff in __asm restraints that diff's like these would fix:

--- i386/i386/math_emulate.c    20 Jun 2002 07:23:08 -0000      1.41
+++ i386/i386/math_emulate.c    17 Jul 2002 02:53:57 -0000
@@ -760,8 +760,7 @@
        if ((ti.sign = (ti.b < 0)) != 0)
                __asm__("notl %0 ; notl %1\n\t"
                        "addl $1,%0 ; adcl $0,%1"
-                       :"=r" (ti.a),"=r" (ti.b)
-                       :"0" (ti.a),"1" (ti.b));
+                       :"+r" (ti.a),"+r" (ti.b));
        int_to_real(&ti,tmp);
 }

(etc.. I have a bunch of these)

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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




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