Port-i386 archive

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

Re: cpuflags (optimal compiler flags for building)




To: "Thomas E. Spanjaard" <tgen%deepbone.net@localhost>

Subject: Re: cpuflags (optimal compiler flags for building)

From: David Brownlee <abs%NetBSD.org@localhost>

Date: Mon, 8 Dec 2008 17:25:03 +0000 (GMT)


On Fri, 5 Dec 2008, Thomas E. Spanjaard wrote:


Thomas E. Spanjaard wrote:

It recommends '-march=pentium3' on a NetBSD/amd64 5.99.01 box (GCC
4.1.3), with an Intel Core 2 Quad CPU at 3GHz (Kentsfield core). The
best fit for GCC 4.1.3 would be '-march=nocona', and less so
'-march=pentium-m'. Newer GCC versions support keywords for the Core 2,
but I haven't checked whether your script checks the GCC version and
keeps a list of supported options.


I just read the source, and I see that you use '-march=pentium3' as
fallback for '-march=core2' for older GCC versions; I'd suggest using
'-march=nocona' instead, because it flags the target as supporting SSE2
and SSE3. Instruction reordering by the compiler would theoretically
benefit most from '-march=pentium-m' on older GCCs, but that lacks SSE3
and x86-64. One snag could be that when using any of the Netburst types
makes the compiler avoid things like ro{r,l}, but I have no clue as to
how GCC really behaves with these flags.


        From cpuflags-1.22 it should automatically set -msse3 based
        on the features flags reported by cpuctl or from dmesg, so
        the fallback should be based on scheduling rather than SSE
        support?

        Based on that core2 should probably fall back to pentium-m first,
        and then pentium-m to pentium3 - I'll adjust the logic - thanks

--
                David/absolute       -- www.NetBSD.org: No hype required --


Follow-Ups:

Re: cpuflags (optimal compiler flags for building)
From: Geert Hendrickx


References:

cpuflags (optimal compiler flags for building)
From: David Brownlee

Re: cpuflags (optimal compiler flags for building)
From: Thomas E. Spanjaard

Re: cpuflags (optimal compiler flags for building)
From: Thomas E. Spanjaard




Prev by Date: ddb and calls to NULL

Next by Date: Re: cpuflags (optimal compiler flags for building)

Previous by Thread: Re: cpuflags (optimal compiler flags for building)

Next by Thread: Re: cpuflags (optimal compiler flags for building)

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index