On Fri, Feb 19, 2010 at 6:31 PM, Joe Buck <joe.b...@synopsys.com> wrote: > On Thu, Feb 18, 2010 at 06:00:07PM -0800, Tim Prince wrote: >> On 2/18/2010 4:54 PM, Joe Buck wrote: >> > >> > But maybe I didn't ask the right question: can any x86 experts comment on >> > recently made x86 CPUs that would not function correctly with code >> > produced by --with-arch=i486? Are there any? >> > >> > >> All CPUs still in production are at least SSE3 capable, unless someone >> can come up with one of which I'm not aware. Intel compilers made the >> switch last year to requiring SSE2 capability for the host, as well as >> in the default target options, even for 32-bit. All x86_64 or X64 CPUs >> for which any compiler was produced had SSE2 capability, so it is >> required for those 64-bit targets. > > I'm sure that Intel and AMD haven't made any in ages, I just wanted to > make sure that there are no low-end third-party cores made recently (say, > by Cyrix, VIA, or someone else) that lack atomics. I guess that the > answer is no.
Forgive me my ignorance, but... Why is this important/relevant? As a user of GCC, I would expect the compiler to generate good code for reasonably modern targets in the default settings. The number of machines that are still based on i386, i486, or even Pentium, is a barely significant minority, yet gcc will by default satisfy the needs of this minority and make it more difficult for the average user to get good code out of the compiler. I work a lot with software developers that use gcc as just one of the many compilers they use (usually they use gcc on linux-ix86 and linux-x86_64, but hp for hppa, intel for itanium-linux, etc.). So far, most of them do not add any -march or -mtune parameters to gcc, so they end up with a program (a structural analysis code) that performs less-than-optimal. One of these users had actually dropped gcc on ix86-linux and x86_64-linux in favor of icc because gcc generated a much slower program. I explained how to change the default settings from i386 to pentium3, narrowing the performance gap to almost nothing. This user now uses gcc for all supported linux based platforms again. My point: gcc may fail to attract users (and/or may be losing users) when it tries to tailor to the needs of minorities. IMHO it would be much more reasonable to change the defaults to generate code that can run on, say, 95% of the computers still in use. If a user want to use the latest-and-greatest gcc for a really old machine, the burden of adding extra flags to change the default behavior of the compiler should be on that user. In this case of the i386 back end, that probably means changing the default to something like pentium3. Ciao! Steven