From bb1b857adc8b49eae4e5a7f5f46984450555dc33 Mon Sep 17 00:00:00 2001 From: Gavin Koch Date: Thu, 18 Dec 1997 15:00:06 +0000 Subject: [PATCH] * calls.c (expand_call): Implement LOAD_ARGS_REVERSED. From-SVN: r17133 --- gcc/ChangeLog | 2 ++ gcc/calls.c | 4 ++++ gcc/tm.texi | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25a230144f0..473fb5c1e48 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -4,6 +4,8 @@ Thu Dec 18 14:51:12 1997 Jason Merrill Thu Dec 18 14:57:29 1997 Gavin Koch + * calls.c (expand_call): Implement LOAD_ARGS_REVERSED. + * dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the frame pointer in the prologue. diff --git a/gcc/calls.c b/gcc/calls.c index 46f766bf483..15a3662a958 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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; diff --git a/gcc/tm.texi b/gcc/tm.texi index 3f451d1f5b0..027a8919b7b 100644 --- a/gcc/tm.texi +++ b/gcc/tm.texi @@ -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 -- 2.30.2