diff gcc/config/i386/i386.h @ 19:58ad6c70ea60

update gcc from 4.4.0 to 4.4.1.
author kent@firefly.cr.ie.u-ryukyu.ac.jp
date Thu, 24 Sep 2009 13:21:57 +0900
parents a06113de4d67
children 77e2b8dfacca
line wrap: on
line diff
--- a/gcc/config/i386/i386.h	Thu Sep 24 13:06:16 2009 +0900
+++ b/gcc/config/i386/i386.h	Thu Sep 24 13:21:57 2009 +0900
@@ -808,6 +808,15 @@
 #define LOCAL_DECL_ALIGNMENT(DECL) \
   ix86_local_alignment ((DECL), VOIDmode, DECL_ALIGN (DECL))
 
+/* If defined, a C expression to compute the minimum required alignment
+   for dynamic stack realignment purposes for EXP (a TYPE or DECL),
+   MODE, assuming normal alignment ALIGN.
+
+   If this macro is not defined, then (ALIGN) will be used.  */
+
+#define MINIMUM_ALIGNMENT(EXP, MODE, ALIGN) \
+  ix86_minimum_alignment (EXP, MODE, ALIGN)
+
 
 /* If defined, a C expression that gives the alignment boundary, in
    bits, of an argument with the specified mode and type.  If it is
@@ -937,52 +946,7 @@
 #define OVERRIDE_ABI_FORMAT(FNDECL) ix86_call_abi_override (FNDECL)
 
 /* Macro to conditionally modify fixed_regs/call_used_regs.  */
-#define CONDITIONAL_REGISTER_USAGE					\
-do {									\
-    int i;								\
-    unsigned int j;							\
-    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)				\
-      {									\
-	if (fixed_regs[i] > 1)						\
-	  fixed_regs[i] = (fixed_regs[i] == (TARGET_64BIT ? 3 : 2));	\
-	if (call_used_regs[i] > 1)					\
-	  call_used_regs[i] = (call_used_regs[i]			\
-			       == (TARGET_64BIT ? 3 : 2));		\
-      }									\
-    j = PIC_OFFSET_TABLE_REGNUM;					\
-    if (j != INVALID_REGNUM)						\
-      fixed_regs[j] = call_used_regs[j] = 1;				\
-    if (TARGET_64BIT							\
-	&& ((cfun && cfun->machine->call_abi == MS_ABI)			\
-	    || (!cfun && DEFAULT_ABI == MS_ABI)))			\
-      {									\
-	call_used_regs[SI_REG] = 0;					\
-	call_used_regs[DI_REG] = 0;					\
-	call_used_regs[XMM6_REG] = 0;					\
-	call_used_regs[XMM7_REG] = 0;					\
-	for (i = FIRST_REX_SSE_REG; i <= LAST_REX_SSE_REG; i++)		\
-	  call_used_regs[i] = 0;					\
-      }									\
-    if (! TARGET_MMX)							\
-      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)			\
-	if (TEST_HARD_REG_BIT (reg_class_contents[(int)MMX_REGS], i))	\
-	  fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = "";	\
-    if (! TARGET_SSE)							\
-      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)			\
-	if (TEST_HARD_REG_BIT (reg_class_contents[(int)SSE_REGS], i))	\
-	  fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = "";	\
-    if (! (TARGET_80387 || TARGET_FLOAT_RETURNS_IN_80387))		\
-      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)			\
-	if (TEST_HARD_REG_BIT (reg_class_contents[(int)FLOAT_REGS], i))	\
-	  fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = "";	\
-    if (! TARGET_64BIT)							\
-      {									\
-	for (i = FIRST_REX_INT_REG; i <= LAST_REX_INT_REG; i++)		\
-	  reg_names[i] = "";						\
-	for (i = FIRST_REX_SSE_REG; i <= LAST_REX_SSE_REG; i++)		\
-	  reg_names[i] = "";						\
-      }									\
-  } while (0)
+#define CONDITIONAL_REGISTER_USAGE  ix86_conditional_register_usage ()
 
 /* Return number of consecutive hard regs needed starting at reg REGNO
    to hold something of mode MODE.
@@ -1208,6 +1172,7 @@
   NO_REGS,
   AREG, DREG, CREG, BREG, SIREG, DIREG,
   AD_REGS,			/* %eax/%edx for DImode */
+  CLOBBERED_REGS,		/* call-clobbered integers */
   Q_REGS,			/* %eax %ebx %ecx %edx */
   NON_Q_REGS,			/* %esi %edi %ebp %esp */
   INDEX_REGS,			/* %eax %ebx %ecx %edx %esi %edi %ebp */
@@ -1256,6 +1221,7 @@
    "AREG", "DREG", "CREG", "BREG",	\
    "SIREG", "DIREG",			\
    "AD_REGS",				\
+   "CLOBBERED_REGS",			\
    "Q_REGS", "NON_Q_REGS",		\
    "INDEX_REGS",			\
    "LEGACY_REGS",			\
@@ -1273,9 +1239,11 @@
    "FLOAT_INT_SSE_REGS",		\
    "ALL_REGS" }
 
-/* Define which registers fit in which classes.
-   This is an initializer for a vector of HARD_REG_SET
-   of length N_REG_CLASSES.  */
+/* Define which registers fit in which classes.  This is an initializer
+   for a vector of HARD_REG_SET of length N_REG_CLASSES.
+
+   Note that the default setting of CLOBBERED_REGS is for 32-bit; this
+   is adjusted by CONDITIONAL_REGISTER_USAGE for the 64-bit ABI in effect.  */
 
 #define REG_CLASS_CONTENTS						\
 {     { 0x00,     0x0 },						\
@@ -1283,6 +1251,7 @@
       { 0x04,     0x0 }, { 0x08, 0x0 },	/* CREG, BREG */		\
       { 0x10,     0x0 }, { 0x20, 0x0 },	/* SIREG, DIREG */		\
       { 0x03,     0x0 },		/* AD_REGS */			\
+      { 0x07,     0x0 },		/* CLOBBERED_REGS */		\
       { 0x0f,     0x0 },		/* Q_REGS */			\
   { 0x1100f0,  0x1fe0 },		/* NON_Q_REGS */		\
       { 0x7f,  0x1fe0 },		/* INDEX_REGS */		\
@@ -1475,6 +1444,7 @@
    || ((CLASS) == AD_REGS)						\
    || ((CLASS) == SIREG)						\
    || ((CLASS) == DIREG)						\
+   || ((CLASS) == SSE_FIRST_REG)					\
    || ((CLASS) == FP_TOP_REG)						\
    || ((CLASS) == FP_SECOND_REG))