public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Unable to ative the SSE instruction set byadding compile flag “march=native” in gcc
@ 2013-08-31 11:15 daxignxing
  2013-10-13  6:39 ` Ryan Hill
  0 siblings, 1 reply; 2+ messages in thread
From: daxignxing @ 2013-08-31 11:15 UTC (permalink / raw)
  To: gcc-help

My machine is Core2 microarchitecture and I try to compile some arithmetic
codes by using the SSE instruction set. I search on the web and official
manual, the answer is everything I need to do (in simplest way)  to add the
flag: march=native, because my chip support SSE. But when I use "gcc
-march=native -Q --help=target -v" to check if the flag really works, the
results display on the screen is a little bit beyond expectation, like:-msse
[disabled]-msse2 [disabled]-msse2avx [disabled]-msse3 [disabled]-msse4
[disabled]-msse4.1 [disabled]-msse4.2 [disabled]-msse4a
[disabled]-msse5-msseregparm [disabled]-mssse3 [disabled]I find all the SSE
(even MMX) is disabled. Can any body tell me why and how to solve it? Many
thanks!PS: I know,an alternative way to active the option is to add the
flags like -mmsse ...manually. But, I am just curiosity, why march=native
doesn't works in my system:core2,Ubuntu 12.04(64bit system), gcc 4.6.3



--
View this message in context: http://gcc.1065356.n5.nabble.com/Unable-to-ative-the-SSE-instruction-set-byadding-compile-flag-march-native-in-gcc-tp964751.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Unable to ative the SSE instruction set byadding compile flag “march=native” in gcc
  2013-08-31 11:15 Unable to ative the SSE instruction set byadding compile flag “march=native” in gcc daxignxing
@ 2013-10-13  6:39 ` Ryan Hill
  0 siblings, 0 replies; 2+ messages in thread
From: Ryan Hill @ 2013-10-13  6:39 UTC (permalink / raw)
  To: gcc-help; +Cc: daxingxing.yu

[-- Attachment #1: Type: text/plain, Size: 1990 bytes --]

On Sat, 31 Aug 2013 03:40:33 -0700 (PDT)
daxignxing <daxingxing.yu@gmail.com> wrote:

> My machine is Core2 microarchitecture and I try to compile some arithmetic
> codes by using the SSE instruction set. I search on the web and official
> manual, the answer is everything I need to do (in simplest way)  to add the
> flag: march=native, because my chip support SSE. But when I use "gcc
> -march=native -Q --help=target -v" to check if the flag really works, the
> results display on the screen is a little bit beyond expectation, like:-msse
> [disabled]-msse2 [disabled]-msse2avx [disabled]-msse3 [disabled]-msse4
> [disabled]-msse4.1 [disabled]-msse4.2 [disabled]-msse4a
> [disabled]-msse5-msseregparm [disabled]-mssse3 [disabled]I find all the SSE
> (even MMX) is disabled. Can any body tell me why and how to solve it? Many
> thanks!PS: I know,an alternative way to active the option is to add the
> flags like -mmsse ...manually. But, I am just curiosity, why march=native
> doesn't works in my system:core2,Ubuntu 12.04(64bit system), gcc 4.6.3

`gcc -march=native -Q --help=target -v` doesn't really work because --help
outputs before the flags that -march=native will enable have been determined.
Try something like `echo "" | gcc -march=native -v -E - 2>&1 | grep cc1`
instead.

$ echo "" | gcc -march=native -v -E - 2>&1 | grep cc1
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.1/cc1 -E -quiet -v - -march=core-avx-i -mcx16 -msahf -mno-movbe -maes -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=core-avx-i


-- 
Ryan Hill                        psn: dirtyepic_sk
   gcc-porting/toolchain/wxwidgets @ gentoo.org

47C3 6D62 4864 0E49 8E9E  7F92 ED38 BD49 957A 8463

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-13  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-31 11:15 Unable to ative the SSE instruction set byadding compile flag “march=native” in gcc daxignxing
2013-10-13  6:39 ` Ryan Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).