* reload.c (find_equiv_reg): Checks all valueno and regno regs
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Apr 2000 21:00:09 +0000 (21:00 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 21 Apr 2000 21:00:09 +0000 (21:00 +0000)
        as a call-clobbered regs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33320 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/reload.c

index de52979..008a523 100644 (file)
@@ -1,3 +1,8 @@
+Fri Apr 21 14:58:29 2000  Denis Chertykov  <denisc@overta.ru>
+
+       * 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  <kenner@vlsi1.ultra.nyu.edu>
 
        * rtl.c: Use NOTE_INSN_REPEATED_LINE_NUMBER and NOTE_INSN_RANGE_BEG.
index 128af48..80df0e4 100644 (file)
@@ -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