aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Parser.vy
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2014-12-29 11:51:25 +0100
committerXavier Leroy <xavier.leroy@inria.fr>2014-12-29 11:51:25 +0100
commit10120fe4d9980139e44012888a91716df2edf2e0 (patch)
treef7348c43fb2c3aca61397b352761394ba17f87f4 /cparser/Parser.vy
parentc8287e6578f313769c794fd407868b1ecb51c43f (diff)
downloadcompcert-kvx-10120fe4d9980139e44012888a91716df2edf2e0.tar.gz
compcert-kvx-10120fe4d9980139e44012888a91716df2edf2e0.zip
Support "asm volatile" (closes: PR#5).
The CompCert back-end already treats "asm" inserts as "volatile" in GCC's sense (performing unpredictable side-effects), so no change is required outside of the parser.
Diffstat (limited to 'cparser/Parser.vy')
-rw-r--r--cparser/Parser.vy2
1 files changed, 2 insertions, 0 deletions
diff --git a/cparser/Parser.vy b/cparser/Parser.vy
index ce1beae0..a058a8d1 100644
--- a/cparser/Parser.vy
+++ b/cparser/Parser.vy
@@ -822,6 +822,8 @@ jump_statement:
asm_statement:
| loc = ASM LPAREN template = STRING_LITERAL RPAREN SEMICOLON
{ let '(wide, chars, _) := template in ASM wide chars loc }
+| loc = ASM VOLATILE LPAREN template = STRING_LITERAL RPAREN SEMICOLON
+ { let '(wide, chars, _) := template in ASM wide chars loc }
(* 6.9 *)
translation_unit_file: