diff options
| author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-06 03:26:17 +0000 |
|---|---|---|
| committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-06 03:26:17 +0000 |
| commit | b2abd7984c1a8ffa79fcbe5b57c7bdce86f311bf (patch) | |
| tree | 0aa64ae9fcc6a0d1c0d433ffd189dbcf5f2c30cb | |
| parent | 7946e2a8a3d90484f7a30e8b5d8c17efd0895239 (diff) | |
| download | ppe42-gcc-b2abd7984c1a8ffa79fcbe5b57c7bdce86f311bf.tar.gz ppe42-gcc-b2abd7984c1a8ffa79fcbe5b57c7bdce86f311bf.zip | |
* calls.c (load_register_parameters): Arrange for call_fusage to
report the whole register as used when shifting to the msb.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70201 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/calls.c | 15 |
2 files changed, 15 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac596b0089f..e3774ae70fa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * builtins.c (expand_builtin): When not optimizing, call the library diff --git a/gcc/calls.c b/gcc/calls.c index 26937c3775b..bdb4288100f 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1633,13 +1633,18 @@ load_register_parameters (struct arg_data *args, int num_actuals, && (args[i].locate.where_pad == (BYTES_BIG_ENDIAN ? upward : downward))) { - rtx ri = gen_rtx_REG (word_mode, REGNO (reg)); rtx x; int shift = (UNITS_PER_WORD - size) * BITS_PER_UNIT; - x = expand_binop (word_mode, ashl_optab, ri, - GEN_INT (shift), ri, 1, OPTAB_WIDEN); - if (x != ri) - emit_move_insn (ri, x); + + /* Assigning REG here rather than a temp makes CALL_FUSAGE + report the whole reg as used. Strictly speaking, the + 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 } |

