diff options
author | J"orn Rennecke <joern.rennecke@superh.com> | 2003-08-13 19:20:16 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2003-08-13 20:20:16 +0100 |
commit | dce20bbc110aac070f2ba36eb4b1656b66161ed9 (patch) | |
tree | 078fefb0a2d0dbd20bc5a1f6c98739157d91cc0c /gcc | |
parent | bc5ad3e6c4208bbac1ccedcb16f7bc140e9a151d (diff) | |
download | gcc-dce20bbc110aac070f2ba36eb4b1656b66161ed9.zip gcc-dce20bbc110aac070f2ba36eb4b1656b66161ed9.tar.gz gcc-dce20bbc110aac070f2ba36eb4b1656b66161ed9.tar.bz2 |
sh.c (sh_get_pr_initial_val): Always wrap in unspec for TARGET_SH1.
* sh.c (sh_get_pr_initial_val): Always wrap in unspec for TARGET_SH1.
* sh.md (load_ra): Change insn predicate to TARGET_SH1.
From-SVN: r70410
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 6 | ||||
-rw-r--r-- | gcc/config/sh/sh.md | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a81302a..a09b228 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-08-13 J"orn Rennecke <joern.rennecke@superh.com> + + * sh.c (sh_get_pr_initial_val): Always wrap in unspec for TARGET_SH1. + * sh.md (load_ra): Change insn predicate to TARGET_SH1. + 2003-08-13 Dale Johannesen <dalej@apple.com> * config/rs6000/rs6000.md (ctrsi, ctrdi): Reenable diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index d1b203b..15d1d1a 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -8865,9 +8865,13 @@ sh_get_pr_initial_val (void) then, we end in trouble if we didn't use the register in the same basic block before. So call get_hard_reg_initial_val now and wrap it in an unspec if we might need to replace it. */ + /* ??? We also must do this for TARGET_SH1 in general, because otherwise + combine can put the pseudo returned by get_hard_reg_initial_val into + instructions that need a general purpose registers, which will fail to + be recognized when the pseudo becomes allocated to PR. */ val = get_hard_reg_initial_val (Pmode, TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG); - if (TARGET_SHCOMPACT && rtx_equal_function_value_matters) + if (TARGET_SH1) return gen_rtx_UNSPEC (SImode, gen_rtvec (1, val), UNSPEC_RA); return val; } diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 2c8462f..bd341a0 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -3475,13 +3475,13 @@ (define_insn_and_split "load_ra" [(set (match_operand:SI 0 "general_movdst_operand" "") (unspec:SI [(match_operand 1 "register_operand" "")] UNSPEC_RA))] - "TARGET_SHCOMPACT" + "TARGET_SH1" "#" "&& ! rtx_equal_function_value_matters" [(set (match_dup 0) (match_dup 1))] " { - if (current_function_has_nonlocal_label) + if (TARGET_SHCOMPACT && current_function_has_nonlocal_label) operands[1] = gen_rtx_MEM (SImode, return_address_pointer_rtx); }") |