diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-04-28 11:21:59 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-04-28 11:21:59 +0200 |
commit | b04bb783badb9051c62b26fb1858f916d0e4ccd0 (patch) | |
tree | c102a6ccdcfad8b4b3a76cffc2019742232a7cb3 /cparser/Cutil.ml | |
parent | 3c6f5343e0e64b273658b6b3508a8dd6c29b8cef (diff) | |
download | compcert-b04bb783badb9051c62b26fb1858f916d0e4ccd0.tar.gz compcert-b04bb783badb9051c62b26fb1858f916d0e4ccd0.zip |
Extended inline asm: handle missing cases.
Bitfields: better translation of initializers and compound literals; run this pass before unblocking.
Transform.stmt: extend with ability to treat unblocked code.
test/regression: more bitfield tests.
Diffstat (limited to 'cparser/Cutil.ml')
-rw-r--r-- | cparser/Cutil.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cparser/Cutil.ml b/cparser/Cutil.ml index 4d6d2137..846010b3 100644 --- a/cparser/Cutil.ml +++ b/cparser/Cutil.ml @@ -964,8 +964,7 @@ let rec subst_stmt phi s = | Sskip | Sbreak | Scontinue - | Sgoto _ - | Sasm _ -> s.sdesc + | Sgoto _ -> s.sdesc | Sdo e -> Sdo (subst_expr phi e) | Sseq(s1, s2) -> Sseq (subst_stmt phi s1, subst_stmt phi s2) | Sif(e, s1, s2) -> @@ -981,6 +980,13 @@ let rec subst_stmt phi s = | Sreturn (Some e) -> Sreturn (Some (subst_expr phi e)) | Sblock sl -> Sblock (List.map (subst_stmt phi) sl) | Sdecl d -> Sdecl (subst_decl phi d) + | Sasm(attr, template, outputs, inputs, clob) -> + let subst_asm_operand (lbl, cstr, e) = + (lbl, cstr, subst_expr phi e) in + Sasm(attr, template, + List.map subst_asm_operand outputs, + List.map subst_asm_operand inputs, + clob) } |