NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/45673: gcc on i386 current generates bad code for assembler code in lock.h



The following reply was made to PR toolchain/45673; it has been noted by GNATS.

From: Alan Barrett <apb%cequrux.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: toolchain/45673: gcc on i386 current generates bad code for
 assembler code in lock.h
Date: Mon, 12 Mar 2012 15:17:36 -0600

 On Sun, 11 Mar 2012, Kai-Uwe Eckhardt wrote:
 > it looks like a problem in the toolchain. The gcc in 
 > 6.0_BETA and current i386 is built with --with-march=i486 
 > --with-tune=nocona. Nocona has the 64 bit registers available 
 > and this leads to wrong code.
 
 According to my reading of "man gcc", -march is supposed 
 to control the available set of CPU features, registers, 
 instructions, and the like, while -mtune is supposed to affect 
 the cost of using the available CPU features (while not affecting 
 the set of available features).  If a feature is not present in 
 the CPU type specified with "-march", but is present in the CPU 
 type specified with "-mtune", then I believe that GCC should NOT 
 attempt to use that feature.
 
 If GCC is invoked with "-march=i486 -mtune=nocona" and is using 
 features that are present in the nocona CPU but not present in the 
 i486 CPU, then I believe that indicates a GCC bug.
 
 --apb (Alan Barrett)
 


Home | Main Index | Thread Index | Old Index