Patchwork : ia64 - allow VMS to redefine TARGET_PROMOTE_FUNCTION_MODE

login
register
mail settings
Submitter Tristan Gingold
Date Dec. 21, 2011, 10:49 a.m.
Message ID <FF0B920C-A077-41CC-8A82-6363148D7822@adacore.com>
Download mbox | patch
Permalink /patch/132615/
State New
Headers show

Comments

Tristan Gingold - Dec. 21, 2011, 10:49 a.m.
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  <gingold@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.
Richard Henderson - Dec. 21, 2011, 6:45 p.m.
On 12/21/2011 02:49 AM, Tristan Gingold wrote:
> 	* 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.

Again, the true default definition in ia64.h is not needed.


r~

Patch

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