diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-23 19:08:56 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-09-23 19:08:56 +0000 |
commit | 2973927c9cb8cb688b06d1ba2773d3c5b7fb5a9d (patch) | |
tree | 9293268eac64e17a465440936726ccb35d7c0668 /gcc/function.c | |
parent | 76b964855968b00725d3d54d12c576bc950e4c02 (diff) | |
download | gcc-2973927c9cb8cb688b06d1ba2773d3c5b7fb5a9d.tar.gz |
gcc/
* function.c (assign_parm_setup_block): Explicitly convert BLKmode
parameters from word_mode to the subword type if such a truncation
is not a no-op.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128696 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c index ffee5982071..5f2dd480d24 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2591,7 +2591,21 @@ assign_parm_setup_block (struct assign_parm_data_all *all, #endif ) { - rtx reg = gen_rtx_REG (mode, REGNO (entry_parm)); + rtx reg; + + /* We are really truncating a word_mode value containing + SIZE bytes into a value of mode MODE. If such an + operation requires no actual instructions, we can refer + to the value directly in mode MODE, otherwise we must + start with the register in word_mode and explicitly + convert it. */ + if (TRULY_NOOP_TRUNCATION (size * BITS_PER_UNIT, BITS_PER_WORD)) + reg = gen_rtx_REG (mode, REGNO (entry_parm)); + else + { + reg = gen_rtx_REG (word_mode, REGNO (entry_parm)); + reg = convert_to_mode (mode, copy_to_reg (reg), 1); + } emit_move_insn (change_address (mem, mode, 0), reg); } |