From f289e226f1468a16627cef00b4678259c7a8d653 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 26 Jan 2004 00:05:38 +0000 Subject: vax.c (TARGET_PROMOTE_PROTOTYPES): New. * config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): New. (TARGET_STRUCT_VALUE_RTX): Likewise. (vax_struct_value_rtx): Likewise. * config/vax/vax.h (STRUCT_VALUE_REGNUM): Rename to VAX_STRUCT_VALUE_REGNUM. (PROMOTE_PROTOTYPES): Remove. From-SVN: r76599 --- gcc/config/vax/vax.c | 16 +++++++++++++++- gcc/config/vax/vax.h | 8 ++------ 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'gcc/config/vax') diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index f572652..7695d69 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -1,5 +1,5 @@ /* Subroutines for insn-output.c for VAX. - Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright (C) 1987, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -52,6 +52,7 @@ static int vax_address_cost_1 (rtx); static int vax_address_cost (rtx); static int vax_rtx_costs_1 (rtx, enum rtx_code, enum rtx_code); static bool vax_rtx_costs (rtx, int, int, int *); +static rtx vax_struct_value_rtx (tree, int); /* Initialize the GCC target structure. */ #undef TARGET_ASM_ALIGNED_HI_OP @@ -78,6 +79,12 @@ static bool vax_rtx_costs (rtx, int, int, int *); #undef TARGET_ADDRESS_COST #define TARGET_ADDRESS_COST vax_address_cost +#undef TARGET_PROMOTE_PROTOTYPES +#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true + +#undef TARGET_STRUCT_VALUE_RTX +#define TARGET_STRUCT_VALUE_RTX vax_struct_value_rtx + struct gcc_target targetm = TARGET_INITIALIZER; /* Set global variables as needed for the options enabled. */ @@ -774,3 +781,10 @@ vax_output_mi_thunk (FILE * file, assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0)); fprintf (file, "+2\n"); } + +static rtx +vax_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED, + int incoming ATTRIBUTE_UNUSED) +{ + return gen_rtx_REG (Pmode, VAX_STRUCT_VALUE_REGNUM); +} diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h index 35d865d..3902c4b 100644 --- a/gcc/config/vax/vax.h +++ b/gcc/config/vax/vax.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler. VAX version. Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -230,7 +230,7 @@ extern int target_flags; /* Register in which address to store a structure value is passed to a function. */ -#define STRUCT_VALUE_REGNUM 1 +#define VAX_STRUCT_VALUE_REGNUM 1 /* Define the classes of registers for register constraints in the machine description. Also define ranges of constants. @@ -833,10 +833,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_REG_CLASSES }; is done just by pretending it is already truncated. */ #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 -/* When a prototype says `char' or `short', really pass an `int'. - (On the VAX, this is required for system-library compatibility.) */ -#define PROMOTE_PROTOTYPES 1 - /* Specify the machine mode that pointers have. After generation of rtl, the compiler makes no further distinction between pointers and any other objects of this machine mode. */ -- cgit v1.1