| Summary: | sys-devel/gcc-4.5.3-r1 doesn't use "-mtune=k8-sse3" when using "-march=native" | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Pacho Ramos <pacho> |
| Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | CC: | xarthisius |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Output | ||
|
Description
Pacho Ramos
2011-09-23 11:38:32 UTC
Output as requested in https://bugs.gentoo.org/show_bug.cgi?id=384129#c3 $ gcc cpuid.c && ./a.out 0x1: 0x20ff0 0x800 0x1 0x78bfbff 0x80000000: 0x80000018 0x68747541 0x444d4163 0x69746e65 0x80000001: 0x20ff0 0x10a 0x1 0xe3d3fbff 0x80000002: 0x20444d41 0x6c687441 0x74286e6f 0x3620296d What about `echo | gcc -dM -E - -march=native` ? does it show SSE3 being defined? Created attachment 287517 [details]
Output
Looks like it's defined, but I attach full output to let you check
With gcc-4.6 I get the same: /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.1/cc1 -quiet - -D_FORTIFY_SOURCE=2 -march=k8-sse3 -mno-cx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-tbm -mno-avx -mno-sse4.2 -mno-sse4.1 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=k8 -quiet -dumpbase - -auxbase-strip /dev/null -o /tmp/cc3rKW9V.s Probably because you don't "tune" for an instruction set. It doesn't make sense. -mtune controls things like scheduling behavior, prefetching, branch costs, etc. These don't change when you tack on SSE3 instructions. -march is what controls which instructions sets are used. As far as tuning is concerned k8 and k8-sse3 are the exact same thing, because gcc has one cost model (struct processor_costs k8_cost in gcc/config/i386.c) and machine model (m_K8 in same) it uses for all K8 family chips. |