aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cleanup.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2015-04-21 13:36:50 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2015-04-21 13:36:50 +0200
commit656525453ed4aea2a273f0d7503e4610741b6171 (patch)
tree376003e0b9162dbd95f167c038bf37b735ec05c7 /cparser/Cleanup.ml
parent84a96e92562461260f7f557d8b973f0f48807e78 (diff)
downloadcompcert-kvx-656525453ed4aea2a273f0d7503e4610741b6171.tar.gz
compcert-kvx-656525453ed4aea2a273f0d7503e4610741b6171.zip
Proper treatment of extended asm.
Diffstat (limited to 'cparser/Cleanup.ml')
-rw-r--r--cparser/Cleanup.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/cparser/Cleanup.ml b/cparser/Cleanup.ml
index 09eaff9b..254f6fed 100644
--- a/cparser/Cleanup.ml
+++ b/cparser/Cleanup.ml
@@ -78,6 +78,8 @@ let add_decl (sto, id, ty, init) =
add_typ ty;
match init with None -> () | Some i -> add_init i
+let add_asm_operand (lbl, cstr, e) = add_exp e
+
let rec add_stmt s =
match s.sdesc with
| Sskip -> ()
@@ -98,7 +100,9 @@ let rec add_stmt s =
| Sreturn(Some e) -> add_exp e
| Sblock sl -> List.iter add_stmt sl
| Sdecl d -> add_decl d
- | Sasm _ -> ()
+ | Sasm(attr, template, outputs, inputs, flags) ->
+ List.iter add_asm_operand outputs;
+ List.iter add_asm_operand inputs
let add_fundef f =
add_typ f.fd_ret;