public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [SPARC] Define MAX_FIXED_MODE_SIZE
@ 2012-08-20 18:50 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2012-08-20 18:50 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: Text/Plain, Size: 444 bytes --]

SPARC is now one of the last mainstream 64-bit platforms that do not define 
MAX_FIXED_MODE_SIZE to TImode.  Doing so helps the Ada compiler in particular 
because it is a heavy user of structures made up of a pair of pointers.

Bootstrapped/regtested/compat-regtested on SPARC64/Solaris, applied on the 
mainline.


2012-08-20  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc.h (MAX_FIXED_MODE_SIZE): Define.


-- 
Eric Botcazou

[-- Attachment #2: sparc_mfms.diff --]
[-- Type: text/x-patch, Size: 1217 bytes --]

Index: config/sparc/sparc.h
===================================================================
--- config/sparc/sparc.h	(revision 190512)
+++ config/sparc/sparc.h	(working copy)
@@ -475,7 +475,6 @@ extern enum cmodel sparc_cmodel;
 #endif
 
 /* Now define the sizes of the C data types.  */
-
 #define SHORT_TYPE_SIZE		16
 #define INT_TYPE_SIZE		32
 #define LONG_TYPE_SIZE		(TARGET_ARCH64 ? 64 : 32)
@@ -512,7 +511,6 @@ extern enum cmodel sparc_cmodel;
 #define SPARC_STACK_BOUNDARY_HACK (TARGET_ARCH64 && TARGET_STACK_BIAS)
 
 /* ALIGN FRAMES on double word boundaries */
-
 #define SPARC_STACK_ALIGN(LOC) \
   (TARGET_ARCH64 ? (((LOC)+15) & ~15) : (((LOC)+7) & ~7))
 
@@ -551,6 +549,10 @@ extern enum cmodel sparc_cmodel;
      : MAX ((COMPUTED), (SPECIFIED)))			\
    :  MAX ((COMPUTED), (SPECIFIED)))
 
+/* An integer expression for the size in bits of the largest integer machine
+   mode that should actually be used.  We allow pairs of registers.  */
+#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (TARGET_ARCH64 ? TImode : DImode)
+
 /* We need 2 words, so we can save the stack pointer and the return register
    of the function containing a non-local goto target.  */
 #define STACK_SAVEAREA_MODE(LEVEL) \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-08-20 18:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-20 18:50 [SPARC] Define MAX_FIXED_MODE_SIZE Eric Botcazou

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