Hi,

a follow-up of the previous patch.  Maybe they should be merged.

VMS/ia64 doesn't closely follow the standard ELF ABI, and keep some aspects of 
the Alpha ABI for backward compatibility.

With the previous patch, this patch fixes a convention call ABI issue, as well 
as an ICE that appears while using 32bit pointers.

Ok for trunk ?

Tristan.

2011-12-21  Tristan Gingold  <ging...@adacore.com>

        * config/ia64/ia64.c (TARGET_PROMOTE_FUNCTION_MODE): Move to...
        * config/ia64/ia64.h (TARGET_PROMOTE_FUNCTION_MODE): ... Here.
        * config/ia64/vms.h (TARGET_PROMOTE_FUNCTION_MODE): Override.

diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 8fe9b51..d74eeb6 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -541,9 +541,6 @@ static const struct attribute_spec ia64_attribute_table[] =
 #define TARGET_ASM_OUTPUT_DWARF_DTPREL ia64_output_dwarf_dtprel
 #endif
 
-#undef TARGET_PROMOTE_FUNCTION_MODE
-#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode
-
 /* ??? Investigate.  */
 #if 0
 #undef TARGET_PROMOTE_PROTOTYPES
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index a3ccd6f..aaa2f26 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -157,6 +157,8 @@ do                                                          
\
   }                                                                    \
 while (0)
 
+#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode
+
 #define PARM_BOUNDARY 64
 
 /* Define this macro if you wish to preserve a certain alignment for the stack
diff --git a/gcc/config/ia64/vms.h b/gcc/config/ia64/vms.h
index fada50c..f34ee78 100644
--- a/gcc/config/ia64/vms.h
+++ b/gcc/config/ia64/vms.h
@@ -154,3 +154,6 @@ STATIC func_ptr __CTOR_LIST__[1]                            
                 \
        (UNSIGNEDP) = 0;                                        \
       (MODE) = DImode;                                         \
     }
+
+#undef TARGET_PROMOTE_FUNCTION_MODE
+#define TARGET_PROMOTE_FUNCTION_MODE 
default_promote_function_mode_always_promote

Reply via email to