Patchwork [SPARC] Define MAX_FIXED_MODE_SIZE

login
register
mail settings
Submitter Eric Botcazou
Date Aug. 20, 2012, 6:46 p.m.
Message ID <201208202046.56751.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/178916/
State New
Headers show

Comments

Eric Botcazou - Aug. 20, 2012, 6:46 p.m.
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.

Patch

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