diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f9d8f0e2385e..dff1b5281e20 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-02-05 David Edelsohn + + * reload.c (refers_to_regno_for_reload_p): Index hard_regno_nregs + with inner_regno, not regno. + * rtlanal.c (refers_to_regno_p): Same. + 2004-02-05 Kazu Hirata * config.gcc: Remove i370 support. diff --git a/gcc/reload.c b/gcc/reload.c index ae123cffdcab..b649a9938a1f 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -6188,8 +6188,8 @@ refers_to_regno_for_reload_p (unsigned int regno, unsigned int endregno, { unsigned int inner_regno = subreg_regno (x); unsigned int inner_endregno - = inner_regno + (regno < FIRST_PSEUDO_REGISTER - ? hard_regno_nregs[regno][GET_MODE (x)] : 1); + = inner_regno + (inner_regno < FIRST_PSEUDO_REGISTER + ? hard_regno_nregs[inner_regno][GET_MODE (x)] : 1); return endregno > inner_regno && regno < inner_endregno; } diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index e85893064094..994d3892ee7b 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1449,8 +1449,8 @@ refers_to_regno_p (unsigned int regno, unsigned int endregno, rtx x, { unsigned int inner_regno = subreg_regno (x); unsigned int inner_endregno - = inner_regno + (regno < FIRST_PSEUDO_REGISTER - ? hard_regno_nregs[regno][GET_MODE (x)] : 1); + = inner_regno + (inner_regno < FIRST_PSEUDO_REGISTER + ? hard_regno_nregs[inner_regno][GET_MODE (x)] : 1); return endregno > inner_regno && regno < inner_endregno; }