public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, Darwin, I386] enable mtune=core2 on darwin and make it the default.
@ 2010-08-13 17:02 IainS
  2010-08-13 17:22 ` Richard Henderson
  2010-08-13 17:36 ` H.J. Lu
  0 siblings, 2 replies; 6+ messages in thread
From: IainS @ 2010-08-13 17:02 UTC (permalink / raw)
  To: GCC Patches; +Cc: mrs, Richard Henderson

Hi,

This brings the default arch on darwin to core2 - as per the OSX 4.2.1  
system compiler.
(which makes our codegen much neater and takes a big chunk off the  
size of cc1*).

---

In order to do that it was necessary to get -mtune=core2 to work ..
... this had a couple of residual cases where the use of movq is  
incompatible with the darwin  assembler.

The use of movd for  r<->x   and r<->Yi seems to be consistent with  
the decisions made elsewhere in PRs (i.e. I am not disturbing the  
status quo, merely making it consistent in a couple of missed places.)

I have bootstrapped this on x86_64 (Core 2 Duo), i686-darwin8 (Xeon)  
and i686-darwin8 (Core Duo).
Note that the Darwin8 default for i686 from apple is nocona/gcc-4.0.1,  
but the use of core2 here does not appear to create any problems
(the processor cannot execute m64 code anyway).

OK for trunk and 4.5?
Iain

Index: gcc/config/i386/mmx.md
===================================================================
--- gcc/config/i386/mmx.md	(revision 163221)
+++ gcc/config/i386/mmx.md	(working copy)
@@ -81,8 +81,8 @@
      %vpxor\t%0, %d0
      %vmovq\t{%1, %0|%0, %1}
      %vmovq\t{%1, %0|%0, %1}
-    %vmovq\t{%1, %0|%0, %1}
-    %vmovq\t{%1, %0|%0, %1}"
+    %vmovd\t{%1, %0|%0, %1}
+    %vmovd\t{%1, %0|%0, %1}"
    [(set_attr "type"  
"imov 
,imov 
,mmx,mmxmov,mmxmov,ssecvt,ssecvt,sselog1,ssemov,ssemov,ssemov,ssemov")
     (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*")
     (set_attr "prefix_rep" "*,*,*,*,*,1,1,*,1,*,*,*")
Index: gcc/config/i386/sse.md
===================================================================
--- gcc/config/i386/sse.md	(revision 163221)
+++ gcc/config/i386/sse.md	(working copy)
@@ -7709,7 +7709,7 @@
    "@
     pinsrq\t{$0x1, %2, %0|%0, %2, 0x1}
     movq\t{%1, %0|%0, %1}
-   movq\t{%1, %0|%0, %1}
+   movd\t{%1, %0|%0, %1}
     movq2dq\t{%1, %0|%0, %1}
     punpcklqdq\t{%2, %0|%0, %2}
     movlhps\t{%2, %0|%0, %2}
@@ -7728,7 +7728,7 @@
    "TARGET_64BIT && TARGET_SSE"
    "@
     movq\t{%1, %0|%0, %1}
-   movq\t{%1, %0|%0, %1}
+   movd\t{%1, %0|%0, %1}
     movq2dq\t{%1, %0|%0, %1}
     punpcklqdq\t{%2, %0|%0, %2}
     movlhps\t{%2, %0|%0, %2}
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc	(revision 163221)
+++ gcc/config.gcc	(working copy)
@@ -1127,17 +1127,13 @@ hppa[12]*-*-hpux11*)
  i[34567]86-*-darwin*)
  	need_64bit_hwint=yes
  	need_64bit_isa=yes
-
-	# This is so that '.../configure && make' doesn't fail due to
-	# config.guess deciding that the configuration is i386-*-darwin* and
-	# then this file using that to set --with-cpu=i386 which has no -m64
-	# support.
-	with_cpu=${with_cpu:-generic}
+	# Baseline choice for a machine that allows m64 support.
+	with_cpu=${with_cpu:-core2}
  	tmake_file="${tmake_file} t-slibgcc-darwin i386/t-crtpc i386/t-crtfm"
  	lto_binary_reader=lto-macho
  	;;
  x86_64-*-darwin*)
-	with_cpu=${with_cpu:-generic}
+	with_cpu=${with_cpu:-core2}
  	tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-darwin  
i386/t-crtpc i386/t-crtfm"
  	tm_file="${tm_file} ${cpu_type}/darwin64.h"
  	lto_binary_reader=lto-macho


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

end of thread, other threads:[~2010-08-13 19:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-13 17:02 [Patch, Darwin, I386] enable mtune=core2 on darwin and make it the default IainS
2010-08-13 17:22 ` Richard Henderson
2010-08-13 17:36 ` H.J. Lu
2010-08-13 17:43   ` IainS
2010-08-13 19:38     ` Jack Howarth
2010-08-13 19:40       ` IainS

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