diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-01-12 14:20:31 +0100 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-01-12 14:20:31 +0100 |
commit | 81e91f965e7b1afbea8d1630015e75f11f0a3afd (patch) | |
tree | 270a85299f33d783e33745c917796f080f7300e1 /powerpc/PrintAsm.ml | |
parent | 3304820b870e4524c7d1f14fcd62506634f7922b (diff) | |
parent | 06841a5bb7ca27bc436e87e7991d0d05dbf5267c (diff) | |
download | compcert-81e91f965e7b1afbea8d1630015e75f11f0a3afd.tar.gz compcert-81e91f965e7b1afbea8d1630015e75f11f0a3afd.zip |
Merge branch 'master' into dwarf
Conflicts:
powerpc/PrintAsm.ml
Diffstat (limited to 'powerpc/PrintAsm.ml')
-rw-r--r-- | powerpc/PrintAsm.ml | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/powerpc/PrintAsm.ml b/powerpc/PrintAsm.ml index 485493b1..97b57c0e 100644 --- a/powerpc/PrintAsm.ml +++ b/powerpc/PrintAsm.ml @@ -25,7 +25,7 @@ open PrintLinux open PrintDiab module AsmPrinter (Target : SYSTEM) = - (struct + struct include Target (* Basic printing functions *) @@ -44,15 +44,14 @@ let section oc sec = fprintf oc " %s\n" name let print_location oc loc = - if loc <> Cutil.no_loc then - print_file_line oc (fst loc) (string_of_int (snd loc)) - + if loc <> Cutil.no_loc then print_file_line oc (fst loc) (snd loc) (* Handling of annotations *) let print_annot_stmt oc txt targs args = if Str.string_match re_file_line txt 0 then begin - print_file_line oc (Str.matched_group 1 txt) (Str.matched_group 2 txt) + print_file_line oc (Str.matched_group 1 txt) + (int_of_string (Str.matched_group 2 txt)) end else begin fprintf oc "%s annotation: " comment; PrintAnnot.print_annot_stmt preg "R1" oc txt targs args @@ -535,7 +534,7 @@ let print_globdef oc (name, gdef) = | Gfun f -> print_fundef oc name f | Gvar v -> print_var oc name v - end) + end type target = Linux | Diab @@ -550,7 +549,7 @@ let print_program oc p = | Diab -> (module Diab_System:SYSTEM)):SYSTEM) in let module Printer = AsmPrinter(Target) in Printer.set_compilation_unit_addrs 1 2; (* TODO This is dummy code *) - Printer.reset_file_line(); + PrintAnnot.reset_filenames(); PrintAnnot.print_version_and_options oc Printer.comment; Printer.print_prologue oc; List.iter (Printer.print_globdef oc) p.prog_defs; |