]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
stmt.c (expand_asm_operands): If an ASM has no outputs, then treat it as volatile.
authorJeffrey A Law <law@cygnus.com>
Fri, 19 Dec 1997 08:29:39 +0000 (08:29 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 19 Dec 1997 08:29:39 +0000 (01:29 -0700)
* stmt.c (expand_asm_operands): If an ASM has no outputs, then treat
it as volatile.
Don't miscompile Linux kernels for egcs-1.0.1.

From-SVN: r17145

gcc/ChangeLog
gcc/stmt.c

index 9033cd1aa5d7b7b8d1b3552cba2f646f447cdccd..acb677d8e9533d3af2022a0ecc13b3612551c81c 100644 (file)
@@ -1,3 +1,8 @@
+Fri Dec 19 09:32:57 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * stmt.c (expand_asm_operands): If an ASM has no outputs, then treat
+       it as volatile.
+
 Wed Dec  3 01:13:45 1997  Jeffrey A Law  (law@cygnus.com)
 
        * version.c: Update for egcs-1.0 release.
index 2fb2d313d826adb053763558e542a34c421b048c..1220a8e1fccd1a165946c8720af93f30c9e94711 100644 (file)
@@ -1421,6 +1421,10 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
   /* The insn we have emitted.  */
   rtx insn;
 
+  /* An ASM with no outputs needs to be treated as volatile.  */
+  if (noutputs == 0)
+    vol = 1;
+
   if (output_bytecode)
     {
       error ("`asm' is invalid when generating bytecode");