This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] VMS ABI stuff for IA64


On 08/01/2009 11:35 PM, Douglas B Rupp wrote:
Steve Ellcey wrote:
On Wed, 2009-07-29 at 19:47 -0700, Douglas B Rupp wrote:

-/* ??? ABI doesn't allow us to define this. */
-#if 0
+/* ??? Non VMS ABI doesn't allow us to define this. */
+#if TARGET_ABI_OPEN_VMS
#undef TARGET_PROMOTE_FUNCTION_ARGS
#define TARGET_PROMOTE_FUNCTION_ARGS hook_bool_tree_true
#endif

-/* ??? ABI doesn't allow us to define this. */
-#if 0
+/* ??? Non VMS ABI doesn't allow us to define this. */
+#if TARGET_ABI_OPEN_VMS
#undef TARGET_PROMOTE_FUNCTION_RETURN
#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
#endif

I don't think these old '#if 0' blocks are adding any useful information, let's just remove them (TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN, and TARGET_PROMOTE_PROTOTYPES) and then move the defines that VMS needs into vms.h where they won't need to be in ifdef's.

gcc/target-def.h will also have to be changed since it will override the definitions if they are moved to vms.h. OK?

You should do like this (with the new hook).


#undef TARGET_PROMOTE_FUNCTION_MODE
#define TARGET_PROMOTE_FUNCTION_MODE ia64_promote_function_mode

...


static enum machine_mode ia64_promote_function_mode (const_tree type ATTRIBUTE_UNUSED, enum machine_mode mode, int *punsignedp ATTRIBUTE_UNUSED) { if (!TARGET_ABI_OPEN_VMS) return mode;

  return promote_mode (type, mode, punsignedp);
}

The old one should have used something like "return TARGET_ABI_OPEN_VMS;".

However, I wonder if this patch is problematic because it does not adjust FUNCTION_VALUE to do the same promotion, as requested in doc/tm.texi.

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]