Port-i386 archive

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

Re: cpuflags (optimal compiler flags for building)



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.

Cheers,
-- 
        Thomas E. Spanjaard
        tgen%netphreax.net@localhost
        tgen%deepbone.net@localhost

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index