* sh.md (load_ra): Change insn predicate to TARGET_SH1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70410
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
2003-08-13 Dale Johannesen <dalej@apple.com>
* config/rs6000/rs6000.md (ctrsi, ctrdi): Reenable
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. */
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);
val
= get_hard_reg_initial_val (Pmode, TARGET_SHMEDIA ? PR_MEDIA_REG : PR_REG);
- if (TARGET_SHCOMPACT && rtx_equal_function_value_matters)
return gen_rtx_UNSPEC (SImode, gen_rtvec (1, val), UNSPEC_RA);
return val;
}
return gen_rtx_UNSPEC (SImode, gen_rtvec (1, val), UNSPEC_RA);
return val;
}
(define_insn_and_split "load_ra"
[(set (match_operand:SI 0 "general_movdst_operand" "")
(unspec:SI [(match_operand 1 "register_operand" "")] UNSPEC_RA))]
(define_insn_and_split "load_ra"
[(set (match_operand:SI 0 "general_movdst_operand" "")
(unspec:SI [(match_operand 1 "register_operand" "")] UNSPEC_RA))]
"#"
"&& ! rtx_equal_function_value_matters"
[(set (match_dup 0) (match_dup 1))]
"
{
"#"
"&& ! 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);
}")
operands[1] = gen_rtx_MEM (SImode, return_address_pointer_rtx);
}")