]> gcc.gnu.org Git - gcc.git/commitdiff
resource.c (mark_set_resources): Handle UNSPEC_VOLATILE...
authorMark Mitchell <mark@codesourcery.com>
Tue, 4 May 1999 16:02:07 +0000 (16:02 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 4 May 1999 16:02:07 +0000 (16:02 +0000)
* resource.c (mark_set_resources): Handle UNSPEC_VOLATILE,
ASM_INPUT, TRAP_IF, and ASM_OPERANDS just like in
mark_referenced_resources.

From-SVN: r26769

gcc/ChangeLog
gcc/resource.c

index 68dd128a47daa53abf6ce56d66ed9a4065ab68ef..fab7d58835d62af17d446bf4ab24de14f50637fc 100644 (file)
@@ -1,3 +1,9 @@
+Tue May  4 13:17:55 1999  Mark Mitchell  <mark@codesourcery.com>
+
+       * resource.c (mark_set_resources): Handle UNSPEC_VOLATILE,
+       ASM_INPUT, TRAP_IF, and ASM_OPERANDS just like in
+       mark_referenced_resources.
+
 Mon May  3 22:38:41 1999  David Edelsohn  <edelsohn@gnu.org>
 
        * rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Change non-PowerPC
index eceac56df90c6feb3ad32f203d020adf165c6aa7..bc214a3dc231649ca102f204b74cd5c7865ba104 100644 (file)
@@ -739,6 +739,28 @@ mark_set_resources (x, res, in_dest, include_delayed_effects)
          SET_HARD_REG_BIT (res->regs, REGNO (x) + i);
       return;
 
+    case UNSPEC_VOLATILE:
+    case ASM_INPUT:
+      /* Traditional asm's are always volatile.  */
+      res->volatil = 1;
+      return;
+
+    case TRAP_IF:
+      res->volatil = 1;
+      break;
+
+    case ASM_OPERANDS:
+      res->volatil = MEM_VOLATILE_P (x);
+
+      /* For all ASM_OPERANDS, we must traverse the vector of input operands.
+        We can not just fall through here since then we would be confused
+        by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate
+        traditional asms unlike their normal usage.  */
+      
+      for (i = 0; i < ASM_OPERANDS_INPUT_LENGTH (x); i++)
+       mark_set_resources (ASM_OPERANDS_INPUT (x, i), res, in_dest, 0);
+      return;
+
     default:
       break;
     }
This page took 0.069709 seconds and 5 git commands to generate.