From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] CFlags for CPU
Date: Wed, 27 Jul 2011 21:56:32 +0100 [thread overview]
Message-ID: <201107272156.55282.michaelkintzios@gmail.com> (raw)
In-Reply-To: <CAK2H+edGUWvcRt-7MV0_FmT+LwTxqcVkN+OvYd06Zd-R=K3N5Q@mail.gmail.com>
[-- Attachment #1: Type: Text/Plain, Size: 3805 bytes --]
On Wednesday 27 Jul 2011 21:24:33 Mark Knecht wrote:
> On Wed, Jul 27, 2011 at 11:32 AM, Mick <michaelkintzios@gmail.com> wrote:
> > On Wednesday 27 Jul 2011 17:13:21 Kfir Lavi wrote:
> >> On Wed, Jul 27, 2011 at 5:34 PM, Kfir Lavi <lavi.kfir@gmail.com> wrote:
> >> > On Wed, Jul 27, 2011 at 5:09 PM, Andy Wilkinson
> >> >
> >> >> Another good trick I've found on the forums is to run:
> >> >> $ gcc -### -e -v -march=native /usr/include/stdlib.h
> >> >>
> >> >> The last line of output will include the various CFLAGS that
> >> >> -march=native
> >> >>
> >> >> picks. In my case (Phenom II 955):
> >> >> "/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/cc1" "-quiet"
> >> >>
> >> >> "/usr/include/stdlib.h" "-D_FORTIFY_SOURCE=2" *"-march=amdfam10"
> >> >> "-mcx16" "-msahf" "-mpopcnt"* "--param" "l1-cache-size=64" "--param"
> >> >> "l1-cache-line-size=64" "--param" "l2-cache-size=512"
> >> >> "-mtune=amdfam10" "-quiet" "-dumpbase" "stdlib.h" "-auxbase"
> >> >> "stdlib" "-o"
> >> >> "/tmp/ccR1PlNZ.s" "--output-pch=/usr/include/stdlib.h.gch"
> >> >>
> >> >> I typically use -march=native when I don't need to worry about
> >> >> distcc, or the options from that output that start with "-m".
> >>
> >> Just shared this trick in my blog.
> >> http://gentoo-what-did-you-say.blogspot.com/2011/07/finding-cpu-flags-us
> >> ing -gcc.html I added a link to this thread in the post.
> >
> > It seems that on my early i7, the -march=core2 does not have all the
> > -msse* flags enabled, while native does:
> >
> > $ diff -y --suppress-common-lines core2.txt native.txt
> > -mcx16 [disabled] | -mcx16 [enabled]
> > -mno-sse4 [enabled] | -mno-sse4 [disabled]
> > -mpopcnt [disabled] | -mpopcnt [enabled]
> > -msahf [disabled] | -msahf [enabled]
> > -msse [disabled] | -msse [enabled]
> > -msse2 [disabled] | -msse2 [enabled]
> > -msse3 [disabled] | -msse3 [enabled]
> > -msse4 [disabled] | -msse4 [enabled]
> > -msse4.1 [disabled] | -msse4.1 [enabled]
> > -msse4.2 [disabled] | -msse4.2 [enabled]
> > -mssse3 [disabled] | -mssse3 [enabled]
> > -mtune= | -mtune= core2
> >
> >
> > I wonder if I should just set it to "-march=native -O2 -pipe" and forget
> > about it ... native it seems to have more stuff switched on and it would
> > probably be a-good-thing® (although my understanding of what each flag
> > does is rather cursory).
> > --
> > Regards,
> > Mick
>
> Just curious if that's consistent with /proc/cpuinfo in the flags
> section? MAybe gcc is wrong in it's enable/disable choices, or maybe
> they know something specific.
>
> This is from an i7-980 Extreme from about 1 year ago:
>
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
> mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe
> syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts
> rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64
> monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt
> aes lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
Same here:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm
constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm
sse4_1 sse4_2 popcnt lahf_lm ida dts tpr_shadow vnmi flexpriority ept vpid
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-07-27 20:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-26 20:36 [gentoo-user] CFlags for CPU Alokat
2011-07-26 18:58 ` Michael Mol
2011-07-27 0:58 ` Bill Kenworthy
2011-07-27 3:08 ` [gentoo-user] " Nikos Chantziaras
2011-07-26 18:59 ` [gentoo-user] " Alan McKinnon
2011-07-26 18:59 ` Mark Knecht
2011-07-26 19:02 ` Paul Hartman
2011-07-26 22:01 ` Mick
2011-07-26 22:15 ` Paul Hartman
2011-07-26 19:22 ` pk
2011-07-27 14:09 ` Andy Wilkinson
2011-07-27 14:34 ` Kfir Lavi
2011-07-27 16:13 ` Kfir Lavi
2011-07-27 18:32 ` Mick
2011-07-27 20:24 ` Mark Knecht
2011-07-27 20:56 ` Mick [this message]
2011-07-27 21:11 ` pk
2011-07-28 9:40 ` Kfir Lavi
2011-07-28 9:46 ` Helmut Jarausch
2011-07-28 9:51 ` Kfir Lavi
2011-07-28 10:01 ` Helmut Jarausch
-- strict thread matches above, loose matches on Subject: below --
2011-07-27 14:52 Pandu Poluan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201107272156.55282.michaelkintzios@gmail.com \
--to=michaelkintzios@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox