This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] VMS ABI stuff for IA64
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Douglas B Rupp <rupp at gnat dot com>
- Cc: sje at cup dot hp dot com, gcc-patches at gcc dot gnu dot org, wilson at codesourcery dot com
- Date: Sun, 02 Aug 2009 08:14:50 +0200
- Subject: Re: [PATCH] VMS ABI stuff for IA64
- References: <4A7109DB.7030909@gnat.com> <1249062688.9481.57.camel@hpsje.cup.hp.com> <4A74B52C.9020402@gnat.com>
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