diff options
author | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2015-04-01 18:28:02 +0200 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2015-04-01 18:28:02 +0200 |
commit | 95ba79b10e832025bbc9843f9d14614f7dff0fcb (patch) | |
tree | 8ca03b99cf6be2aab8c7b266196569019a2a7f13 /backend/PrintMach.ml | |
parent | 68e2ce02f8d69b26c9cea6e0d338f855cbea3ace (diff) | |
parent | e11b3b885a6d359925b86743b89698cc6757157a (diff) | |
download | compcert-95ba79b10e832025bbc9843f9d14614f7dff0fcb.tar.gz compcert-95ba79b10e832025bbc9843f9d14614f7dff0fcb.zip |
Merge pull request #34 from AbsInt/extended-annotations
Extended annotations
Diffstat (limited to 'backend/PrintMach.ml')
-rw-r--r-- | backend/PrintMach.ml | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/backend/PrintMach.ml b/backend/PrintMach.ml index b356ca9e..8484a5c3 100644 --- a/backend/PrintMach.ml +++ b/backend/PrintMach.ml @@ -34,15 +34,6 @@ let rec regs pp = function | [r] -> reg pp r | r1::rl -> fprintf pp "%a, %a" reg r1 regs rl -let annot_param pp = function - | APreg r -> reg pp r - | APstack(chunk, ofs) -> fprintf pp "stack(%s,%ld)" (name_of_chunk chunk) (camlint_of_coqint ofs) - -let rec annot_params pp = function - | [] -> () - | [r] -> annot_param pp r - | r1::rl -> fprintf pp "%a, %a" annot_param r1 annot_params rl - let ros pp = function | Coq_inl r -> reg pp r | Coq_inr s -> fprintf pp "\"%s\"" (extern_atom s) @@ -78,7 +69,8 @@ let print_instruction pp i = fprintf pp "\t%a = %s(%a)\n" regs res (name_of_external ef) regs args | Mannot(ef, args) -> - fprintf pp "\t%s(%a)\n" (name_of_external ef) annot_params args + fprintf pp "\t%s(%a)\n" + (name_of_external ef) (print_annot_args reg) args | Mlabel lbl -> fprintf pp "%5d:" (P.to_int lbl) | Mgoto lbl -> |