[Bug c/56507] GCC -march=native for Core2Duo

2013-03-02 Thread bratsinot at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56507



--- Comment #2 from Alexander bratsinot at gmail dot com 2013-03-02 13:49:39 
UTC ---

(In reply to comment #1)

 (In reply to comment #0)

  GCC -march=native includes only flags: -mmmx -msse -msse2 -msse3 -mssse3

  but some Core2Duo processors have -msse4 -msse4.1.

 

 But yours must not.  GCC's -march=native uses cpuid's flags field to see if

 sse4/sse4.1 is supported.

 

 From driver-i386.c:

   __cpuid (1, eax, ebx, ecx, edx);

 ...  

   has_sse4_1 = ecx  bit_SSE4_1;

   has_sse4_2 = ecx  bit_SSE4_2;

 ...

   const char *sse4_2 = has_sse4_2 ?  -msse4.2 :  -mno-sse4.2;

   const char *sse4_1 = has_sse4_1 ?  -msse4.1 :  -mno-sse4.1;



I have Core2Duo E8200, this is Wolfdale and this processor include SSE4.1.


[Bug c/56507] GCC -march=native for Core2Duo

2013-03-02 Thread pinskia at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56507



--- Comment #3 from Andrew Pinski pinskia at gcc dot gnu.org 2013-03-02 
17:41:13 UTC ---

Can you invoke the following command:

cat /proc/cpuinfo


[Bug c/56507] GCC -march=native for Core2Duo

2013-03-02 Thread bratsinot at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56507



--- Comment #4 from Alexander bratsinot at gmail dot com 2013-03-02 18:51:35 
UTC ---

(In reply to comment #3)

 Can you invoke the following command:

 cat /proc/cpuinfo



I'm terribly sorry, something went wrong (several times), when I executed gcc

-march=native -Q --help=target, and -msse4.1 been unchecked.


[Bug c/56507] GCC -march=native for Core2Duo

2013-03-01 Thread pinskia at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56507



Andrew Pinski pinskia at gcc dot gnu.org changed:



   What|Removed |Added



 Status|UNCONFIRMED |RESOLVED

 Resolution||INVALID



--- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org 2013-03-02 
07:23:26 UTC ---

(In reply to comment #0)

 GCC -march=native includes only flags: -mmmx -msse -msse2 -msse3 -mssse3

 but some Core2Duo processors have -msse4 -msse4.1.



But yours must not.  GCC's -march=native uses cpuid's flags field to see if

sse4/sse4.1 is supported.



From driver-i386.c:

  __cpuid (1, eax, ebx, ecx, edx);

...  

  has_sse4_1 = ecx  bit_SSE4_1;

  has_sse4_2 = ecx  bit_SSE4_2;

...

  const char *sse4_2 = has_sse4_2 ?  -msse4.2 :  -mno-sse4.2;

  const char *sse4_1 = has_sse4_1 ?  -msse4.1 :  -mno-sse4.1;