From: Gavin Koch Date: Thu, 18 Dec 1997 15:00:06 +0000 (+0000) Subject: * calls.c (expand_call): Implement LOAD_ARGS_REVERSED. X-Git-Tag: releases/libf2c-0.5.21~324 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb1b857adc8b49eae4e5a7f5f46984450555dc33;p=thirdparty%2Fgcc.git * calls.c (expand_call): Implement LOAD_ARGS_REVERSED. From-SVN: r17133 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 25a230144f07..473fb5c1e481 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 46f766bf4834..15a3662a9589 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 3f451d1f5b0a..027a8919b7b7 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