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]

Re: [RFC] Turn on -mapp-regs by default on Solaris


> As discovered by David, -mapp-regs was turned off by default on Solaris
> about 6 years ago (by you, Richard, the rationale was not crystal-clear
> AFAICT).

Here's what I've committed on mainline and 4.0 branch:

2005-05-18  Eric Botcazou  <ebotcazou@libertysurf.fr>

	* config/sparc/sol2.h (TARGET_DEFAULT): Add back MASK_APP_REGS.
	* config/sparc/sol2-64.h (TARGET_DEFAULT): Likewise.
	* config/sparc/sp-elf.h (TARGET_DEFAULT): Delete.
	* doc/invoke.texi (SPARC options): Document that -mapp-regs is
	the default on Solaris too.


[I've also discovered that Sun switched the default code V9 model in their 
Studio 10 compiler (at least on Solaris 10) from MedAny to MedMid.]

-- 
Eric Botcazou
Index: config/sparc/sol2-64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2-64.h,v
retrieving revision 1.7
diff -u -r1.7 sol2-64.h
--- config/sparc/sol2-64.h	3 Jan 2005 21:00:24 -0000	1.7
+++ config/sparc/sol2-64.h	18 May 2005 06:54:25 -0000
@@ -4,4 +4,4 @@
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT \
   (MASK_V9 + MASK_PTR64 + MASK_64BIT /* + MASK_HARD_QUAD */ + \
-   MASK_STACK_BIAS + MASK_FPU + MASK_LONG_DOUBLE_128)
+   MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
Index: config/sparc/sol2.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2.h,v
retrieving revision 1.69
diff -u -r1.69 sol2.h
--- config/sparc/sol2.h	22 Jan 2005 12:53:25 -0000	1.69
+++ config/sparc/sol2.h	18 May 2005 06:54:25 -0000
@@ -148,7 +148,8 @@
 /* Solaris allows 64 bit out and global registers in 32 bit mode.
    sparc_override_options will disable V8+ if not generating V9 code.  */
 #undef TARGET_DEFAULT
-#define TARGET_DEFAULT (MASK_V8PLUS + MASK_FPU + MASK_LONG_DOUBLE_128)
+#define TARGET_DEFAULT (MASK_V8PLUS + MASK_APP_REGS + MASK_FPU \
+			+ MASK_LONG_DOUBLE_128)
 
 /* Solaris-specific #pragmas are implemented on top of attributes.  Hook in
    the bits from config/sol2.c.  */
Index: config/sparc/sp-elf.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sp-elf.h,v
retrieving revision 1.1
diff -u -r1.1 sp-elf.h
--- config/sparc/sp-elf.h	24 Jan 2005 21:31:52 -0000	1.1
+++ config/sparc/sp-elf.h	18 May 2005 06:54:25 -0000
@@ -22,9 +22,6 @@
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparc-elf)")
 
-#undef TARGET_DEFAULT
-#define TARGET_DEFAULT MASK_FPU
-
 /* Don't assume anything about the header files.  */
 #define NO_IMPLICIT_EXTERN_C
 
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.620
diff -u -r1.620 invoke.texi
--- doc/invoke.texi	13 May 2005 17:51:16 -0000	1.620
+++ doc/invoke.texi	18 May 2005 06:57:29 -0000
@@ -11618,7 +11618,7 @@
 @opindex mapp-regs
 Specify @option{-mapp-regs} to generate output using the global registers
 2 through 4, which the SPARC SVR4 ABI reserves for applications.  This
-is the default, except on Solaris.
+is the default.
 
 To be fully SVR4 ABI compliant at the cost of some performance loss,
 specify @option{-mno-app-regs}.  You should compile libraries and system

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