]> gcc.gnu.org Git - gcc.git/commitdiff
ia64-protos.h: Remove the prototype for ia64_setup_incoming_varargs and ia64_return_i...
authorKazu Hirata <kazu@cs.umass.edu>
Mon, 26 Jan 2004 15:32:42 +0000 (15:32 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Mon, 26 Jan 2004 15:32:42 +0000 (15:32 +0000)
* config/ia64/ia64-protos.h: Remove the prototype for
ia64_setup_incoming_varargs and ia64_return_in_memory.
* config/ia64/ia64.c (TARGET_STRUCT_VALUE_RTX): New.
(TARGET_RETURN_IN_MEMORY): Likewise.
(TARGET_SETUP_INCOMING_VARARGS): Likewise.
(TARGET_STRICT_ARGUMENT_NAMING): Likewise.
(ia64_setup_incoming_varargs): Adjust the arguments to meet
the requirement of TARGET_SETUP_INCOMING_VARARGS.
(ia64_return_in_memory): Make it static.  Change the return
type to bool from int.  Add an argument.
(ia64_struct_value_rtx): New.
* config/ia64/ia64.h: Remove commented-out definitions of
PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, and
PROMOTE_PROTOTYPES.
(RETURN_IN_MEMORY): Remove.
(STRUCT_VALUE_REGNUM): Likewise.
(STRICT_ARGUMENT_NAMING): Likewise.

From-SVN: r76635

gcc/ChangeLog
gcc/config/ia64/ia64-protos.h
gcc/config/ia64/ia64.c
gcc/config/ia64/ia64.h

index af75fc13ef374c8a5e2463eedb8d4facb5fb9a17..757afc59cdf7042de46f577f2f4bc9af12f4629d 100644 (file)
@@ -1,3 +1,23 @@
+2004-01-26  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/ia64/ia64-protos.h: Remove the prototype for
+       ia64_setup_incoming_varargs and ia64_return_in_memory.
+       * config/ia64/ia64.c (TARGET_STRUCT_VALUE_RTX): New.
+       (TARGET_RETURN_IN_MEMORY): Likewise.
+       (TARGET_SETUP_INCOMING_VARARGS): Likewise.
+       (TARGET_STRICT_ARGUMENT_NAMING): Likewise.
+       (ia64_setup_incoming_varargs): Adjust the arguments to meet
+       the requirement of TARGET_SETUP_INCOMING_VARARGS.
+       (ia64_return_in_memory): Make it static.  Change the return
+       type to bool from int.  Add an argument.
+       (ia64_struct_value_rtx): New.
+       * config/ia64/ia64.h: Remove commented-out definitions of
+       PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN, and
+       PROMOTE_PROTOTYPES.
+       (RETURN_IN_MEMORY): Remove.
+       (STRUCT_VALUE_REGNUM): Likewise.
+       (STRICT_ARGUMENT_NAMING): Likewise.
+
 2004-01-26  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR target/13666
index c6920fabf4d811a777fa2a0eeb60b4dea8c30195..50456a61e5e0a88ba15dcf8a77e4560619a006f2 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GNU compiler for IA-64.
-   Copyright (C) 1999, 2000, 2002, 2003
+   Copyright (C) 1999, 2000, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -114,15 +114,12 @@ extern rtx ia64_va_arg (tree, tree);
 extern rtx ia64_function_value (tree, tree);
 #endif /* RTX_CODE */
 
-extern void ia64_setup_incoming_varargs (CUMULATIVE_ARGS, int, tree,
-                                        int *, int);
 extern int ia64_function_arg_partial_nregs (CUMULATIVE_ARGS *,
                                            enum machine_mode, tree, int);
 extern void ia64_function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode,
                                       tree, int);
 extern int ia64_function_arg_pass_by_reference (CUMULATIVE_ARGS *,
                                                enum machine_mode, tree, int);
-extern int ia64_return_in_memory (tree);
 extern void ia64_asm_output_external (FILE *, tree, const char *);
 #endif /* TREE_CODE */
 
index a0af1b4b505c46b6c9366f9b1170e8353abfc50e..b97dcd2bc38506e09e1f30ebe9e650a9ab7b26c1 100644 (file)
@@ -1,5 +1,6 @@
 /* Definitions of target machine for GNU compiler.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
    Contributed by James E. Wilson <wilson@cygnus.com> and
                  David Mosberger <davidm@hpl.hp.com>.
 
@@ -182,7 +183,10 @@ static rtx gen_fr_spill_x (rtx, rtx, rtx);
 static rtx gen_fr_restore_x (rtx, rtx, rtx);
 
 static enum machine_mode hfa_element_mode (tree, int);
+static void ia64_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode,
+                                        tree, int *, int);
 static bool ia64_function_ok_for_sibcall (tree, tree);
+static bool ia64_return_in_memory (tree, tree);
 static bool ia64_rtx_costs (rtx, int, int, int *);
 static void fix_range (const char *);
 static struct machine_function * ia64_init_machine_status (void);
@@ -260,6 +264,7 @@ static void ia64_vms_init_libfuncs (void)
 
 static tree ia64_handle_model_attribute (tree *, tree, tree, int, bool *);
 static void ia64_encode_section_info (tree, rtx, int);
+static rtx ia64_struct_value_rtx (tree, int);
 
 \f
 /* Table of valid machine attributes.  */
@@ -366,6 +371,34 @@ static const struct attribute_spec ia64_attribute_table[] =
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO ia64_encode_section_info
 
+/* ??? ABI doesn't allow us to define this.  */
+#if 0
+#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
+#undef TARGET_PROMOTE_FUNCTION_RETURN
+#define TARGET_PROMOTE_FUNCTION_RETURN hook_bool_tree_true
+#endif
+
+/* ??? Investigate.  */
+#if 0
+#undef TARGET_PROMOTE_PROTOTYPES
+#define TARGET_PROMOTE_PROTOTYPES hook_bool_tree_true
+#endif
+
+#undef TARGET_STRUCT_VALUE_RTX
+#define TARGET_STRUCT_VALUE_RTX ia64_struct_value_rtx
+#undef TARGET_RETURN_IN_MEMORY
+#define TARGET_RETURN_IN_MEMORY ia64_return_in_memory
+
+#undef TARGET_SETUP_INCOMING_VARARGS
+#define TARGET_SETUP_INCOMING_VARARGS ia64_setup_incoming_varargs
+#undef TARGET_STRICT_ARGUMENT_NAMING
+#define TARGET_STRICT_ARGUMENT_NAMING hook_bool_CUMULATIVE_ARGS_true
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
 /* Return 1 if OP is a valid operand for the MEM of a CALL insn.  */
@@ -3375,17 +3408,19 @@ ia64_initialize_trampoline (rtx addr, rtx fnaddr, rtx static_chain)
 
    We generate the actual spill instructions during prologue generation.  */
 
-void
-ia64_setup_incoming_varargs (CUMULATIVE_ARGS cum, int int_mode, tree type,
-                            int * pretend_size,
+static void
+ia64_setup_incoming_varargs (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+                            tree type, int * pretend_size,
                             int second_time ATTRIBUTE_UNUSED)
 {
+  CUMULATIVE_ARGS next_cum = *cum;
+
   /* Skip the current argument.  */
-  ia64_function_arg_advance (&cum, int_mode, type, 1);
+  ia64_function_arg_advance (&next_cum, mode, type, 1);
 
-  if (cum.words < MAX_ARGUMENT_SLOTS)
+  if (next_cum.words < MAX_ARGUMENT_SLOTS)
     {
-      int n = MAX_ARGUMENT_SLOTS - cum.words;
+      int n = MAX_ARGUMENT_SLOTS - next_cum.words;
       *pretend_size = n * UNITS_PER_WORD;
       cfun->machine->n_varargs = n;
     }
@@ -3846,8 +3881,8 @@ ia64_va_arg (tree valist, tree type)
 /* Return 1 if function return value returned in memory.  Return 0 if it is
    in a register.  */
 
-int
-ia64_return_in_memory (tree valtype)
+static bool
+ia64_return_in_memory (tree valtype, tree fntype ATTRIBUTE_UNUSED)
 {
   enum machine_mode mode;
   enum machine_mode hfa_mode;
@@ -3859,7 +3894,7 @@ ia64_return_in_memory (tree valtype)
     {
       byte_size = int_size_in_bytes (valtype);
       if (byte_size < 0)
-       return 1;
+       return true;
     }
 
   /* Hfa's with up to 8 elements are returned in the FP argument registers.  */
@@ -3870,14 +3905,14 @@ ia64_return_in_memory (tree valtype)
       int hfa_size = GET_MODE_SIZE (hfa_mode);
 
       if (byte_size / hfa_size > MAX_ARGUMENT_SLOTS)
-       return 1;
+       return true;
       else
-       return 0;
+       return false;
     }
   else if (byte_size > UNITS_PER_WORD * MAX_INT_RETURN_SLOTS)
-    return 1;
+    return true;
   else
-    return 0;
+    return false;
 }
 
 /* Return rtx for register that holds the function return value.  */
@@ -8803,4 +8838,13 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
   no_new_pseudos = 0;
 }
 
+/* Worker function for TARGET_STRUCT_VALUE_RTX.  */
+
+static rtx
+ia64_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
+                      int incoming ATTRIBUTE_UNUSED)
+{
+  return gen_rtx_REG (Pmode, GR_REG (8));
+}
+
 #include "gt-ia64.h"
index 84e864908c1ca1ccb4297a0fede1c7e318372944..e9fd52a1452a55291bd6daea36d3357337cc70bd 100644 (file)
@@ -1,5 +1,6 @@
 /* Definitions of target machine GNU compiler.  IA-64 version.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
+   Free Software Foundation, Inc.
    Contributed by James E. Wilson <wilson@cygnus.com> and
                  David Mosberger <davidm@hpl.hp.com>.
 
@@ -344,12 +345,6 @@ do                                                                 \
   }                                                                    \
 while (0)
 
-/* ??? ABI doesn't allow us to define this.  */
-/* #define PROMOTE_FUNCTION_ARGS */
-
-/* ??? ABI doesn't allow us to define this.  */
-/* #define PROMOTE_FUNCTION_RETURN */
-
 #define PARM_BOUNDARY 64
 
 /* Define this macro if you wish to preserve a certain alignment for the stack
@@ -1267,13 +1262,6 @@ enum reg_class
 \f
 /* Passing Function Arguments on the Stack */
 
-/* Define this macro if an argument declared in a prototype as an integral type
-   smaller than `int' should actually be passed as an `int'.  In addition to
-   avoiding errors in certain cases of mismatch, it also makes for better code
-   on certain machines.  */
-/* ??? Investigate.  */
-/* #define PROMOTE_PROTOTYPES */
-
 /* If defined, the maximum amount of space required for outgoing arguments will
    be computed and placed into the variable
    `current_function_outgoing_args_size'.  */
@@ -1434,22 +1422,11 @@ do {                                                                    \
 \f
 /* How Large Values are Returned */
 
-/* A nonzero value says to return the function value in memory, just as large
-   structures are always returned.  */
-
-#define RETURN_IN_MEMORY(TYPE) \
-  ia64_return_in_memory (TYPE)
-
 /* If you define this macro to be 0, then the conventions used for structure
    and union return values are decided by the `RETURN_IN_MEMORY' macro.  */
 
 #define DEFAULT_PCC_STRUCT_RETURN 0
 
-/* If the structure value address is passed in a register, then
-   `STRUCT_VALUE_REGNUM' should be the number of that register.  */
-
-#define STRUCT_VALUE_REGNUM GR_REG (8)
-
 \f
 /* Caller-Saves Register Allocation */
 
@@ -1523,21 +1500,6 @@ do {                                                                     \
   fputs ("\tmov out2 = b0\n", FILE);                                   \
   fputs ("\tbr.call.sptk.many b0 = _mcount;;\n", FILE);                        \
 } while (0)
-\f
-/* Implementing the Varargs Macros.  */
-
-/* Define this macro to store the anonymous register arguments into the stack
-   so that all the arguments appear to have been passed consecutively on the
-   stack.  */
-
-#define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \
-    ia64_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE, SECOND_TIME)
-
-/* Define this macro if the location where a function argument is passed
-   depends on whether or not it is a named argument.  */
-
-#define STRICT_ARGUMENT_NAMING  1
-
 \f
 /* Trampolines for Nested Functions.  */
 
This page took 0.086002 seconds and 5 git commands to generate.