diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-07-19 12:39:17 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2017-07-19 12:39:17 +0200 |
commit | 32d25a371fc0e1aaea2a94459363b21e9841d637 (patch) | |
tree | b96b4c7555eb3fbe0190caaae79010e27c731123 /riscV/TargetPrinter.ml | |
parent | 2a78e5fd2f2c70fdd20048b3e23162ad97b2b2b6 (diff) | |
download | compcert-32d25a371fc0e1aaea2a94459363b21e9841d637.tar.gz compcert-32d25a371fc0e1aaea2a94459363b21e9841d637.zip |
Print_annot should produce a string.
Diffstat (limited to 'riscV/TargetPrinter.ml')
-rw-r--r-- | riscV/TargetPrinter.ml | 11 |
1 files changed, 8 insertions, 3 deletions
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; |