For some reason on core2 Duo hardware there is difference between gcc
-march=native and -march=core2. -mcx16 and -msahf do not exist in -march=core2,
I've googled but failed to find why. Probably it's good idea to add it?

 # cat /proc/cpuinfo  | egrep '(model name|flags)' | head -n2
model name      : Intel(R) Core(TM)2 Duo CPU     L7500  @ 1.60GHz
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 lm
constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx est
tm2 ssse3 cx16 xtpr pdcm lahf_lm ida tpr_shadow vnmi flexpriority

 # LC_ALL=C gcc -Q --help=target  -march=native > march-native
 # LC_ALL=C gcc -Q --help=target  -march=core2 > march-core2
 # diff -u march-core2 march-native
--- march-core2 2009-01-07 00:28:58.000000000 +0300
+++ march-native        2009-01-07 00:28:49.000000000 +0300
@@ -18,7 +18,7 @@
   -mbranch-cost=
   -mcld                                [disabled]
   -mcmodel=
-  -mcx16                               [disabled]
+  -mcx16                               [enabled]
   -mfancy-math-387                     [enabled]
   -mfp-ret-in-387                      [enabled]
   -mfpmath=
@@ -46,7 +46,7 @@
   -mred-zone                           [enabled]
   -mregparm=
   -mrtd                                [disabled]
-  -msahf                               [disabled]
+  -msahf                               [enabled]
   -msoft-float                         [disabled]
   -msse                                [disabled]
   -msse2                               [disabled]
@@ -63,7 +63,7 @@
   -mstringop-strategy=
   -mtls-dialect=
   -mtls-direct-seg-refs                [enabled]
-  -mtune=
+  -mtune=                              core2
   -muclibc                             [disabled]
   -mveclibabi=

Thank you for your time.


-- 
           Summary: native and core2 differ on core2 hardware (add -mcx16
                    and -msahf when build with -march=core2)
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pva at gentoo dot org


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

Reply via email to