This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Darwin, I386] enable mtune=core2 on darwin and make it the default.


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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]