]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reload.c (find_equiv_reg): Reject equivalences separated by a volatile instruction.
authorRichard Henderson <rth@cygnus.com>
Sun, 16 Aug 1998 00:54:51 +0000 (17:54 -0700)
committerJeff Law <law@gcc.gnu.org>
Sun, 16 Aug 1998 00:54:51 +0000 (18:54 -0600)

        * reload.c (find_equiv_reg): Reject equivalences separated
        by a volatile instruction.

From-SVN: r21761

gcc/ChangeLog
gcc/reload.c

index e14fc70b037af8cbc504cf146db04fddcf78ca94..9685207a9873bf84a57f8456dc79c37188c9916c 100644 (file)
@@ -1,3 +1,8 @@
+Sun Aug 16 01:53:21 1998  Richard Henderson  <rth@cygnus.com>
+
+       * reload.c (find_equiv_reg): Reject equivalences separated
+       by a volatile instruction.
+
 Sun Aug 16 00:21:44 1998 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
 
        * rs6000/linux.h (CPP_OS_DEFAULT_SPEC): Define.
index 1461cad5f83281ad07b41826fb70333594a4a8dc..b1483d19440a4f0d75dfd53ce40f9a6ea6eb468f 100644 (file)
@@ -6198,12 +6198,17 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode)
 
       if (GET_RTX_CLASS (GET_CODE (p)) == 'i')
        {
+         pat = PATTERN (p);
+
+          /* Watch out for unspec_volatile, and volatile asms.  */
+          if (volatile_insn_p (pat))
+           return 0;
+
          /* If this insn P stores in either GOAL or VALUE, return 0.
             If GOAL is a memory ref and this insn writes memory, return 0.
             If GOAL is a memory ref and its address is not constant,
             and this insn P changes a register used in GOAL, return 0.  */
 
-         pat = PATTERN (p);
          if (GET_CODE (pat) == SET || GET_CODE (pat) == CLOBBER)
            {
              register rtx dest = SET_DEST (pat);