Commit 980f6e8e by Alan Modra Committed by Alan Modra

calls.c (load_register_parameters): Arrange for call_fusage to report the whole…

calls.c (load_register_parameters): Arrange for call_fusage to report the whole register as used when...

	* calls.c (load_register_parameters): Arrange for call_fusage to
	report the whole register as used when shifting to the msb.

From-SVN: r70201
parent e7cca7f4
2003-08-06 Alan Modra <amodra@bigpond.net.au>
* calls.c (load_register_parameters): Arrange for call_fusage to
report the whole register as used when shifting to the msb.
2003-08-05 Roger Sayle <roger@eyesopen.com> 2003-08-05 Roger Sayle <roger@eyesopen.com>
* builtins.c (expand_builtin): When not optimizing, call the library * builtins.c (expand_builtin): When not optimizing, call the library
......
...@@ -1633,13 +1633,18 @@ load_register_parameters (struct arg_data *args, int num_actuals, ...@@ -1633,13 +1633,18 @@ load_register_parameters (struct arg_data *args, int num_actuals,
&& (args[i].locate.where_pad && (args[i].locate.where_pad
== (BYTES_BIG_ENDIAN ? upward : downward))) == (BYTES_BIG_ENDIAN ? upward : downward)))
{ {
rtx ri = gen_rtx_REG (word_mode, REGNO (reg));
rtx x; rtx x;
int shift = (UNITS_PER_WORD - size) * BITS_PER_UNIT; int shift = (UNITS_PER_WORD - size) * BITS_PER_UNIT;
x = expand_binop (word_mode, ashl_optab, ri,
GEN_INT (shift), ri, 1, OPTAB_WIDEN); /* Assigning REG here rather than a temp makes CALL_FUSAGE
if (x != ri) report the whole reg as used. Strictly speaking, the
emit_move_insn (ri, x); call only uses SIZE bytes at the msb end, but it doesn't
seem worth generating rtl to say that. */
reg = gen_rtx_REG (word_mode, REGNO (reg));
x = expand_binop (word_mode, ashl_optab, reg,
GEN_INT (shift), reg, 1, OPTAB_WIDEN);
if (x != reg)
emit_move_insn (reg, x);
} }
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment