diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d911b36410f..97fed21b855 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-12-23 Kaz Kojima + + PR target/18511 + * reload1.c (emit_output_reload_insns): Check if OLD is a hard + register before calling regno_clobbered_p. + * reload.c: Update comment for regno_clobbered_p. + 2004-12-22 Richard Henderson * config/i386/i386.c (override_options): Respect user disable of diff --git a/gcc/reload.c b/gcc/reload.c index dc45ea5e0f3..9c0836a53b7 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -6940,7 +6940,8 @@ find_inc_amount (rtx x, rtx inced) } /* Return 1 if register REGNO is the subject of a clobber in insn INSN. - If SETS is nonzero, also consider SETs. */ + If SETS is nonzero, also consider SETs. REGNO must refer to a hard + register. */ int regno_clobbered_p (unsigned int regno, rtx insn, enum machine_mode mode, diff --git a/gcc/reload1.c b/gcc/reload1.c index c90c8b61eea..1fec0cdcc43 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -6705,7 +6705,8 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl, || !(set = single_set (insn)) || rtx_equal_p (old, SET_DEST (set)) || !reg_mentioned_p (old, SET_SRC (set)) - || !regno_clobbered_p (REGNO (old), insn, rl->mode, 0)) + || !((REGNO (old) < FIRST_PSEUDO_REGISTER) + && regno_clobbered_p (REGNO (old), insn, rl->mode, 0))) gen_reload (old, reloadreg, rl->opnum, rl->when_needed); }