From aad2919faeeb4582f3b0dd3299f19e40c863950a Mon Sep 17 00:00:00 2001 From: Denis Chertykov Date: Fri, 21 Apr 2000 21:00:09 +0000 Subject: reload.c (find_equiv_reg): Checks all valueno and regno regs as a call-clobbered regs. * reload.c (find_equiv_reg): Checks all valueno and regno regs as a call-clobbered regs. From-SVN: r33320 --- gcc/ChangeLog | 5 +++++ gcc/reload.c | 27 +++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index de52979..008a523 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Fri Apr 21 14:58:29 2000 Denis Chertykov + + * reload.c (find_equiv_reg): Checks all valueno and regno regs + as a call-clobbered regs. + Fri Apr 21 13:30:26 2000 Richard Kenner * rtl.c: Use NOTE_INSN_REPEATED_LINE_NUMBER and NOTE_INSN_RANGE_BEG. diff --git a/gcc/reload.c b/gcc/reload.c index 128af48..80df0e4 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -6160,16 +6160,23 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode) /* Don't trust the conversion past a function call if either of the two is in a call-clobbered register, or memory. */ - if (GET_CODE (p) == CALL_INSN - && ((regno >= 0 && regno < FIRST_PSEUDO_REGISTER - && call_used_regs[regno]) - || - (valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER - && call_used_regs[valueno]) - || - goal_mem - || need_stable_sp)) - return 0; + if (GET_CODE (p) == CALL_INSN) + { + int i; + + if (goal_mem || need_stable_sp) + return 0; + + if (regno >= 0 && regno < FIRST_PSEUDO_REGISTER) + for (i = 0; i < nregs; ++i) + if (call_used_regs[regno + i]) + return 0; + + if (valueno >= 0 && valueno < FIRST_PSEUDO_REGISTER) + for (i = 0; i < valuenregs; ++i) + if (call_used_regs[valueno + i]) + return 0; + } #ifdef NON_SAVING_SETJMP if (NON_SAVING_SETJMP && GET_CODE (p) == NOTE -- cgit v1.1