diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2004-09-16 23:37:00 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2004-09-16 23:37:00 +0000 |
commit | e57450ce82981f069b6bb45b75b116ec05da14ca (patch) | |
tree | 652a2257c51f6d3d85733280d0a23a511f8ba2fa | |
parent | 67bcc252247fa1d0e45258c2ce927b666e621321 (diff) | |
download | gcc-e57450ce82981f069b6bb45b75b116ec05da14ca.zip gcc-e57450ce82981f069b6bb45b75b116ec05da14ca.tar.gz gcc-e57450ce82981f069b6bb45b75b116ec05da14ca.tar.bz2 |
sh.md (call): Extend 32-bit addresses to DImode for 32-bit TARGET_SHMEDIA.
* config/sh/sh.md (call): Extend 32-bit addresses to DImode
for 32-bit TARGET_SHMEDIA.
(call_value): Likewise.
From-SVN: r87619
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/sh/sh.md | 20 |
2 files changed, 24 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8648e7c..31e4df2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-09-16 Kaz Kojima <kkojima@gcc.gnu.org> + + * config/sh/sh.md (call): Extend 32-bit addresses to DImode + for 32-bit TARGET_SHMEDIA. + (call_value): Likewise. + 2004-09-16 Diego Novillo <dnovillo@redhat.com> * tree-ssa-operands.c (add_call_clobber_ops): Make read-only diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 31e05a2..5adcac2 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -5800,11 +5800,19 @@ if (GET_MODE (operands[0]) != DImode) operands[0] = gen_rtx_SUBREG (DImode, operands[0], 0); } - else + else if (TARGET_SHMEDIA64) { operands[0] = shallow_copy_rtx (operands[0]); PUT_MODE (operands[0], DImode); } + else + { + rtx reg = gen_reg_rtx (DImode); + + operands[0] = copy_to_mode_reg (SImode, operands[0]); + emit_insn (gen_extendsidi2 (reg, operands[0])); + operands[0] = reg; + } } if (! target_reg_operand (operands[0], DImode)) operands[0] = copy_to_mode_reg (DImode, operands[0]); @@ -6025,11 +6033,19 @@ if (GET_MODE (operands[1]) != DImode) operands[1] = gen_rtx_SUBREG (DImode, operands[1], 0); } - else + else if (TARGET_SHMEDIA64) { operands[1] = shallow_copy_rtx (operands[1]); PUT_MODE (operands[1], DImode); } + else + { + rtx reg = gen_reg_rtx (DImode); + + operands[1] = copy_to_mode_reg (SImode, operands[1]); + emit_insn (gen_extendsidi2 (reg, operands[1])); + operands[1] = reg; + } } if (! target_reg_operand (operands[1], DImode)) operands[1] = copy_to_mode_reg (DImode, operands[1]); |