This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Change 64-bit code model to Medium/Middle on SPARC/Solaris
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 5 Feb 2006 22:55:58 +0100
- Subject: Change 64-bit code model to Medium/Middle on SPARC/Solaris
This patch changes the default code model in 64-bit mode from Medium/Anywhere
to Medium/Middle on SPARC/Solaris. Sun made the same move in the Studio 9
compiler (and didn't undo it in the Studio 10 and 11 compilers :-). It has
a positive impact on the speed of the bootstrapped 64-bit compiler itself,
around 10% according to limited experiments.
Tested on Solaris 7, 8, 9 and 10, both with GNU binutils and the Sun tools,
applied to mainline and 4.1 branch. I'll add a line to the release notes.
2006-02-05 Eric Botcazou <ebotcazou@libertysurf.fr>
* config/sparc/sol2-bi.h (SPARC_DEFAULT_CMODEL): Set to CM_MEDMID.
--
Eric Botcazou
Index: config/sparc/sol2-bi.h
===================================================================
--- config/sparc/sol2-bi.h (revision 110584)
+++ config/sparc/sol2-bi.h (working copy)
@@ -1,9 +1,11 @@
/* Definitions of target machine for GCC, for bi-arch SPARC
running Solaris 2 using the system assembler and linker. */
-/* The default code model. */
+/* The default code model used to be CM_MEDANY on Solaris
+ but even Sun eventually found it to be quite wasteful
+ and changed it to CM_MEDMID in the Studio 9 compiler. */
#undef SPARC_DEFAULT_CMODEL
-#define SPARC_DEFAULT_CMODEL CM_MEDANY
+#define SPARC_DEFAULT_CMODEL CM_MEDMID
#define AS_SPARC64_FLAG "-xarch=v9"