From 33b742bb41725e47bd88dc12f2a4f40173023f83 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Fri, 27 Mar 2015 14:24:03 +0100 Subject: Updated the Caml part. Added some more tests in annot1.c. --- common/PrintAST.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'common/PrintAST.ml') diff --git a/common/PrintAST.ml b/common/PrintAST.ml index e4d79c3e..52aa963a 100644 --- a/common/PrintAST.ml +++ b/common/PrintAST.ml @@ -55,7 +55,7 @@ let name_of_external = function | EF_annot_val(text, targ) -> sprintf "annot_val %S" (extern_atom text) | EF_inline_asm text -> sprintf "inline_asm %S" (extern_atom text) -let print_annot_arg px oc = function +let rec print_annot_arg px oc = function | AA_base x -> px oc x | AA_int n -> fprintf oc "int %ld" (camlint_of_coqint n) | AA_long n -> fprintf oc "long %Ld" (camlint64_of_coqint n) @@ -70,7 +70,9 @@ let print_annot_arg px oc = function (name_of_chunk chunk) (extern_atom id) (camlint_of_coqint ofs) | AA_addrglobal(id, ofs) -> fprintf oc "&%s + %ld" (extern_atom id) (camlint_of_coqint ofs) - | AA_longofwords(hi, lo) -> fprintf oc "longofwords %a %a" px hi px lo + | AA_longofwords(hi, lo) -> + fprintf oc "longofwords(%a, %a)" + (print_annot_arg px) hi (print_annot_arg px) lo let rec print_annot_args px oc = function | [] -> () -- cgit