From 32d25a371fc0e1aaea2a94459363b21e9841d637 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 19 Jul 2017 12:39:17 +0200 Subject: Print_annot should produce a string. --- riscV/TargetPrinter.ml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'riscV/TargetPrinter.ml') diff --git a/riscV/TargetPrinter.ml b/riscV/TargetPrinter.ml index 7a369832..65339d35 100644 --- a/riscV/TargetPrinter.ml +++ b/riscV/TargetPrinter.ml @@ -97,6 +97,11 @@ module Target : TARGET = | FR r -> freg oc r | _ -> assert false + let preg_annot = function + | IR r -> int_reg_name r + | FR r -> float_reg_name r + | _ -> assert false + (* Names of sections *) let name_of_section = function @@ -585,10 +590,10 @@ module Target : TARGET = | Pbuiltin(ef, args, res) -> begin match ef with | EF_annot(txt, targs) -> - fprintf oc "%s annotation: " comment; - print_annot_text preg "sp" oc (camlstring_of_coqstring txt) args + fprintf oc "%s annotation: %s\n" comment + (annot_text preg_annot "sp" (camlstring_of_coqstring txt) args) | EF_debug(kind, txt, targs) -> - print_debug_info comment print_file_line preg "sp" oc + print_debug_info comment print_file_line preg_annot "sp" oc (P.to_int kind) (extern_atom txt) args | EF_inline_asm(txt, sg, clob) -> fprintf oc "%s begin inline assembly\n\t" comment; -- cgit