vax.c (TARGET_PROMOTE_PROTOTYPES): New.
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 26 Jan 2004 00:05:38 +0000 (00:05 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 26 Jan 2004 00:05:38 +0000 (00:05 +0000)
* 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/ChangeLog
gcc/config/vax/vax.c
gcc/config/vax/vax.h

index 186bdb985b285d32780613c95620836584ec4170..7217aec175e214589c938fbc3403602effe3c756 100644 (file)
@@ -1,3 +1,12 @@
+2004-01-25  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * 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.
+
 2004-01-26  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
  
         * config/c4x/c4x.h (LEGITIMIZE_RELOAD_ADDRESS):  Handle symref.
index f572652fadee77b330cb3d3886560f0509809c7e..7695d6964f833e7703fb59bc7079772834f3e493 100644 (file)
@@ -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);
 \f
 /* 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;
 \f
 /* 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");                                              
 }
+\f
+static rtx
+vax_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
+                     int incoming ATTRIBUTE_UNUSED)
+{
+  return gen_rtx_REG (Pmode, VAX_STRUCT_VALUE_REGNUM);
+}
index 35d865d0f8a72a0bf91ba40157ea2675d2fba679..3902c4b749e88b109773927e5ea8cdac7ee3efb4 100644 (file)
@@ -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
 \f
 /* 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.  */