public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/38749]  New: native and core2 differ on core2 hardware (add -mcx16 and -msahf when build with -march=core2)
@ 2009-01-06 21:42 pva at gentoo dot org
  2009-01-06 21:48 ` [Bug target/38749] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pva at gentoo dot org @ 2009-01-06 21:42 UTC (permalink / raw)
  To: gcc-bugs

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


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

* [Bug target/38749] native and core2 differ on core2 hardware (add -mcx16 and -msahf when build with -march=core2)
  2009-01-06 21:42 [Bug driver/38749] New: native and core2 differ on core2 hardware (add -mcx16 and -msahf when build with -march=core2) pva at gentoo dot org
@ 2009-01-06 21:48 ` pinskia at gcc dot gnu dot org
  2009-01-06 22:34 ` [Bug target/38749] native and core2 differ on core2 hardware pva at gentoo dot org
  2009-01-07  7:22 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-06 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-01-06 21:48 -------
      {"core2", PROCESSOR_CORE2, CPU_CORE2,
        PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2 | PTA_SSE3
        | PTA_SSSE3 | PTA_CX16},


-- 


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


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

* [Bug target/38749] native and core2 differ on core2 hardware
  2009-01-06 21:42 [Bug driver/38749] New: native and core2 differ on core2 hardware (add -mcx16 and -msahf when build with -march=core2) pva at gentoo dot org
  2009-01-06 21:48 ` [Bug target/38749] " pinskia at gcc dot gnu dot org
@ 2009-01-06 22:34 ` pva at gentoo dot org
  2009-01-07  7:22 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pva at gentoo dot org @ 2009-01-06 22:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pva at gentoo dot org  2009-01-06 22:34 -------
Andrew, ah, right. But then, why output differs? Gentoo does not modifies this
bits...


-- 

pva at gentoo dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|native and core2 differ on  |native and core2 differ on
                   |core2 hardware (add -mcx16  |core2 hardware
                   |and -msahf when build with -|
                   |march=core2)                |


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


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

* [Bug target/38749] native and core2 differ on core2 hardware
  2009-01-06 21:42 [Bug driver/38749] New: native and core2 differ on core2 hardware (add -mcx16 and -msahf when build with -march=core2) pva at gentoo dot org
  2009-01-06 21:48 ` [Bug target/38749] " pinskia at gcc dot gnu dot org
  2009-01-06 22:34 ` [Bug target/38749] native and core2 differ on core2 hardware pva at gentoo dot org
@ 2009-01-07  7:22 ` ubizjak at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ubizjak at gmail dot com @ 2009-01-07  7:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2009-01-07 07:21 -------
(In reply to comment #2)
> Andrew, ah, right. But then, why output differs? Gentoo does not modifies this
> bits...

gcc driver has separate checks for CPUID features. So, it first determines CPU
model and then adds appropriate flags, derived from CPUID.


-- 


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


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

end of thread, other threads:[~2009-01-07  7:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-06 21:42 [Bug driver/38749] New: native and core2 differ on core2 hardware (add -mcx16 and -msahf when build with -march=core2) pva at gentoo dot org
2009-01-06 21:48 ` [Bug target/38749] " pinskia at gcc dot gnu dot org
2009-01-06 22:34 ` [Bug target/38749] native and core2 differ on core2 hardware pva at gentoo dot org
2009-01-07  7:22 ` ubizjak at gmail dot com

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).