]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pa-protos.h (function_arg): Remove last argument.
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Wed, 16 Apr 2003 23:00:25 +0000 (23:00 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Wed, 16 Apr 2003 23:00:25 +0000 (23:00 +0000)
PR/10271
* pa-protos.h (function_arg): Remove last argument.
* pa.c (function_arg): Likewise.  Use CUMULATIVE_ARGS struct instead.
* pa.h (struct hppa_args): Add member incoming.
(INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Initialize
member incoming.
(FUNCTION_ARG): Revise call to function_arg.
(FUNCTION_INCOMING_ARG): Delete.

From-SVN: r65705

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

index 2c9ce2d8078ffdc81299c84d409789bb279e34e1..b1840252bb23002575466ae25993e94b31371642 100644 (file)
@@ -1,3 +1,14 @@
+2003-04-16  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR/10271
+       * pa-protos.h (function_arg): Remove last argument.
+       * pa.c (function_arg): Likewise.  Use CUMULATIVE_ARGS struct instead.
+       * pa.h (struct hppa_args): Add member incoming. 
+       (INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_INCOMING_ARGS): Initialize
+       member incoming.
+       (FUNCTION_ARG): Revise call to function_arg.
+       (FUNCTION_INCOMING_ARG): Delete.
+
 2003-04-15  Jason Merrill  <jason@redhat.com>
 
        PR middle-end/10336, c++/10401
index 163cf28528fed4e0ce4c9c863dae2e02f7732c64..77b43f8bd5235164bc1f51f0f3520673419f771a 100644 (file)
@@ -157,7 +157,7 @@ extern int cmpib_comparison_operator PARAMS ((rtx, enum machine_mode));
 extern int reloc_needed PARAMS ((tree));
 #ifdef RTX_CODE
 extern rtx function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode,
-                                tree, int, int));
+                                tree, int));
 #endif
 extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *,
                                               enum machine_mode,
index b51bfa18ec341d45d35288d23f1049f0dae40eb6..545768be8a08a682c964e894b7f6e04e6f8917a7 100644 (file)
@@ -7206,12 +7206,11 @@ insn_refs_are_delayed (insn)
    ??? We might want to restructure this so that it looks more like other
    ports.  */
 rtx
-function_arg (cum, mode, type, named, incoming)
+function_arg (cum, mode, type, named)
      CUMULATIVE_ARGS *cum;
      enum machine_mode mode;
      tree type;
      int named ATTRIBUTE_UNUSED;
-     int incoming;
 {
   int max_arg_words = (TARGET_64BIT ? 8 : 4);
   int fpr_reg_base;
@@ -7345,7 +7344,7 @@ function_arg (cum, mode, type, named, incoming)
   if (((TARGET_PORTABLE_RUNTIME || TARGET_64BIT || TARGET_ELF32)
        /* If we are doing soft-float with portable runtime, then there
          is no need to worry about FP regs.  */
-       && ! TARGET_SOFT_FLOAT
+       && !TARGET_SOFT_FLOAT
        /* The parameter must be some kind of float, else we can just
          pass it in integer registers.  */
        && FLOAT_MODE_P (mode)
@@ -7354,14 +7353,15 @@ function_arg (cum, mode, type, named, incoming)
        /* libcalls do not need to pass items in both FP and general
          registers.  */
        && type != NULL_TREE
-       /* All this hair applies to outgoing args only.  */
-       && ! incoming)
+       /* All this hair applies to "outgoing" args only.  This includes
+         sibcall arguments setup with FUNCTION_INCOMING_ARG.  */
+       && !cum->incoming)
       /* Also pass outgoing floating arguments in both registers in indirect
         calls with the 32 bit ABI and the HP assembler since there is no
         way to the specify argument locations in static functions.  */
-      || (! TARGET_64BIT
-         && ! TARGET_GAS
-         && ! incoming
+      || (!TARGET_64BIT
+         && !TARGET_GAS
+         && !cum->incoming
          && cum->indirect
          && FLOAT_MODE_P (mode)))
     {
index 72b56d8cb8586b38d3f00a5086f010f985c301d1..b7cc4f36c4afe2598de3aa6f71928fc8c5c01492 100644 (file)
@@ -715,12 +715,21 @@ extern struct rtx_def *hppa_pic_save_rtx PARAMS ((void));
    and about the args processed so far, enough to enable macros
    such as FUNCTION_ARG to determine where the next arg should go.
 
-   On the HP-PA, this is a single integer, which is a number of words
+   On the HP-PA, the WORDS field holds the number of words
    of arguments scanned so far (including the invisible argument,
-   if any, which holds the structure-value-address).
-   Thus 4 or more means all following args should go on the stack.  */
+   if any, which holds the structure-value-address).  Thus, 4 or
+   more means all following args should go on the stack.
+   
+   The INCOMING field tracks whether this is an "incoming" or
+   "outgoing" argument.
+   
+   The INDIRECT field indicates whether this is is an indirect
+   call or not.
+   
+   The NARGS_PROTOTYPE field indicates that an argument does not
+   have a prototype when it less than or equal to 0.  */
 
-struct hppa_args {int words, nargs_prototype, indirect; };
+struct hppa_args {int words, nargs_prototype, incoming, indirect; };
 
 #define CUMULATIVE_ARGS struct hppa_args
 
@@ -730,6 +739,7 @@ struct hppa_args {int words, nargs_prototype, indirect; };
 
 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) \
   (CUM).words = 0,                                                     \
+  (CUM).incoming = 0,                                                  \
   (CUM).indirect = INDIRECT,                                           \
   (CUM).nargs_prototype = (FNTYPE && TYPE_ARG_TYPES (FNTYPE)           \
                           ? (list_length (TYPE_ARG_TYPES (FNTYPE)) - 1 \
@@ -744,6 +754,7 @@ struct hppa_args {int words, nargs_prototype, indirect; };
 
 #define INIT_CUMULATIVE_INCOMING_ARGS(CUM,FNTYPE,IGNORE) \
   (CUM).words = 0,                             \
+  (CUM).incoming = 1,                          \
   (CUM).indirect = 0,                          \
   (CUM).nargs_prototype = 1000
 
@@ -817,10 +828,7 @@ struct hppa_args {int words, nargs_prototype, indirect; };
    tempted to try and simply it, but I worry about breaking something.  */
 
 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
-  function_arg (&CUM, MODE, TYPE, NAMED, 0)
-
-#define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
-  function_arg (&CUM, MODE, TYPE, NAMED, 1)
+  function_arg (&CUM, MODE, TYPE, NAMED)
 
 /* For an arg passed partly in registers and partly in memory,
    this is the number of registers used.