* calls.c (expand_call): Implement LOAD_ARGS_REVERSED.
authorGavin Koch <gavin@cygnus.com>
Thu, 18 Dec 1997 15:00:06 +0000 (15:00 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 18 Dec 1997 15:00:06 +0000 (08:00 -0700)
From-SVN: r17133

gcc/ChangeLog
gcc/calls.c
gcc/tm.texi

index 25a230144f0791a1ed0a2b0dc68bac1b3e21c547..473fb5c1e4813ab0c5b855b075d0bd4729857d02 100644 (file)
@@ -4,6 +4,8 @@ Thu Dec 18 14:51:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
 Thu Dec 18 14:57:29 1997  Gavin Koch  <gavin@cygnus.com>
 
+       * calls.c (expand_call): Implement LOAD_ARGS_REVERSED.
+
        * dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the
        frame pointer in the prologue.
 
index 46f766bf48343f663c0401a5c340ac0fd62442bc..15a3662a95891d1c5c9a7edafea0052bf6db2a1f 100644 (file)
@@ -1884,7 +1884,11 @@ expand_call (exp, target, ignore)
      Mark all register-parms as living through the call, putting these USE
      insns in the CALL_INSN_FUNCTION_USAGE field.  */
 
+#ifdef LOAD_ARGS_REVERSED
+  for (i = num_actuals - 1; i >= 0; i--)
+#else
   for (i = 0; i < num_actuals; i++)
+#endif
     {
       rtx reg = args[i].reg;
       int partial = args[i].partial;
index 3f451d1f5b0ae82ca03df8d58a43081a316f09d0..027a8919b7b76c87102f09e065a112d74ca3d60c 100644 (file)
@@ -2848,6 +2848,14 @@ register in which function arguments are sometimes passed.  This does
 the structure-value address.  On many machines, no registers can be
 used for this purpose since all function arguments are pushed on the
 stack.
+
+@findex LOAD_ARGS_REVERSED
+@item LOAD_ARGS_REVERSED
+If defined, the order in which arguments are loaded into their
+respective argument registers is reversed so that the last 
+argument is loaded first.  This macro only effects arguments
+passed in registers.
+
 @end table
 
 @node Scalar Return