Gentoo Archives: gentoo-amd64

From: Jack Lloyd <lloyd@×××××××××.net>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] CFLAGS for Core2?
Date: Wed, 20 Sep 2006 20:27:12
Message-Id: 20060920202512.GN18048@randombit.net
1 Tomorrow my new Core 2 workstation should be arriving, and reading
2 through the 2006.1 amd64 install notes and so forth, the recomended
3 CFLAGS for EM64T CPUs is -march=nocona. However as that is tuned for
4 64-bit enabled Netburst rather than Conroe, I'm wondering if anyone
5 had thoughts on good flags. In particular as (to the extent that I
6 know anything about microarchitecture), Conroe seems closer to a K8
7 than a P4, especially with regards to pipeline length and execution
8 resources, I'm not sure that P4/Netburst tuning is the right thing to
9 do. But the GCC docs say that -march=k8 enables 3dnow, which Intel
10 chips don't have. So, right now the "seems likely" options would
11 be:
12
13 -march=k8 -mno-3dnow -msse3
14 -march=nocona
15 -march=pentium-m -m64 [saw this suggested in the forums, seems like a bad idea]
16
17 Or can I get away with just something like
18
19 -mtune=k8 -msse3 (will this get me 64-bit code?)
20
21 To be clear, my main goals here are a) enable generation of all
22 instructions the CPU has, b) keep GCC from generating 3dnow,etc
23 instructions, and c) get instruction scheduling that is at least
24 moderately decent for the uarch I'm using.
25
26 Since SSE/SSE2, -mfpmath=sse, and argument passing via registers are
27 default in 64-bit mode, I suspect the only other options I might try
28 are -momit-leaf-frame-pointer, -frename-registers, and
29 -finline-functions.
30
31 Ideas?
32
33 -Jack
34 --
35 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] CFLAGS for Core2? Simon Stelling <blubb@g.o>
Re: [gentoo-amd64] CFLAGS for Core2? Paul de Vrieze <pauldv@g.o>
Re: [gentoo-amd64] CFLAGS for Core2? Eric Augustus <shrike@×××××××××.com>