diff options
Diffstat (limited to 'contrib/gcc/stmt.c')
-rw-r--r-- | contrib/gcc/stmt.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/contrib/gcc/stmt.c b/contrib/gcc/stmt.c index 4ba3021..05705e7 100644 --- a/contrib/gcc/stmt.c +++ b/contrib/gcc/stmt.c @@ -1281,18 +1281,25 @@ n_occurrences (c, s) } /* Generate RTL for an asm statement (explicit assembler code). - BODY is a STRING_CST node containing the assembler code text, - or an ADDR_EXPR containing a STRING_CST. */ - + STRING is a STRING_CST node containing the assembler code text, + or an ADDR_EXPR containing a STRING_CST. VOL nonzero means the + insn is volatile; don't optimize it. */ void -expand_asm (body) - tree body; +expand_asm (string, vol) + tree string; + int vol; { - if (TREE_CODE (body) == ADDR_EXPR) - body = TREE_OPERAND (body, 0); + rtx body; + + if (TREE_CODE (string) == ADDR_EXPR) + string = TREE_OPERAND (string, 0); + + body = gen_rtx_ASM_INPUT (VOIDmode, TREE_STRING_POINTER (string)); + + MEM_VOLATILE_P (body) = vol; + + emit_insn (body); - emit_insn (gen_rtx_ASM_INPUT (VOIDmode, - TREE_STRING_POINTER (body))); last_expr_type = 0; } |