From 9ced742dd72a19f076f37537c591e79b11729b40 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Fri, 19 Dec 1997 08:29:39 +0000 Subject: [PATCH] stmt.c (expand_asm_operands): If an ASM has no outputs, then treat it as volatile. * 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 | 5 +++++ gcc/stmt.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9033cd1aa5d7..acb677d8e953 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/stmt.c b/gcc/stmt.c index 2fb2d313d826..1220a8e1fccd 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -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"); -- 2.47.2