OSDN Git Service

* combine.c (can_combine_p): Don't combine with an asm whose
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 1997 22:06:43 +0000 (22:06 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 1997 22:06:43 +0000 (22:06 +0000)
        output is a hard register.

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

gcc/ChangeLog
gcc/combine.c

index 32a3239..fb1218f 100644 (file)
@@ -1,3 +1,8 @@
+Thu Oct 16 15:07:51 1997  Richard Henderson  <rth@cygnus.com>
+
+       * combine.c (can_combine_p): Don't combine with an asm whose
+       output is a hard register.
+
 Thu Oct 16 15:43:26 1997  Mike Stump  (mrs@wrs.com)
 
        * c-decl.c (start_struct): Ensure that structs with forward
index 2ef88c0..3626e48 100644 (file)
@@ -1003,6 +1003,13 @@ can_combine_p (insn, i3, pred, succ, pdest, psrc)
          && p != succ && volatile_refs_p (PATTERN (p)))
        return 0;
 
+  /* If INSN is an asm, and DEST is a hard register, reject, since it has
+     to be an explicit register variable, and was chosen for a reason.  */
+
+  if (GET_CODE (src) == ASM_OPERANDS
+      && GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER)
+    return 0;
+
   /* If there are any volatile insns between INSN and I3, reject, because
      they might affect machine state.  */