aboutsummaryrefslogtreecommitdiffstats
path: root/ia32
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-03-10 10:30:16 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-03-10 10:30:16 +0100
commite37e366c826a0dc422e449b9ad0afa70be204e12 (patch)
tree3bcc0c14099862614d19c95fee0edc7b388720b3 /ia32
parent8aae10b50b321cfcbde86582cdd7ce1df8960628 (diff)
parent3e01154d693e1c457e1e974f5e9ebaa4601050aa (diff)
downloadcompcert-e37e366c826a0dc422e449b9ad0afa70be204e12.tar.gz
compcert-e37e366c826a0dc422e449b9ad0afa70be204e12.zip
Merge branch 'master' into dwarf
Diffstat (limited to 'ia32')
-rw-r--r--ia32/PrintAsm.ml28
1 files changed, 10 insertions, 18 deletions
diff --git a/ia32/PrintAsm.ml b/ia32/PrintAsm.ml
index c77347da..eba416e4 100644
--- a/ia32/PrintAsm.ml
+++ b/ia32/PrintAsm.ml
@@ -81,7 +81,7 @@ module Cygwin_System =
fprintf oc "_%s" s
let symbol oc symb =
- fprintf oc "%s" (extern_atom symb)
+ raw_symbol oc (extern_atom symb)
let label oc lbl =
fprintf oc "L%d" lbl
@@ -130,9 +130,9 @@ module ELF_System =
let raw_symbol oc s =
fprintf oc "%s" s
-
- let symbol oc symb =
- fprintf oc "%s" (extern_atom symb)
+
+ let symbol oc symb =
+ raw_symbol oc (extern_atom symb)
let label oc lbl =
fprintf oc ".L%d" lbl
@@ -188,7 +188,7 @@ module MacOS_System =
fprintf oc "_%s" s
let symbol oc symb =
- fprintf oc "_%s" (extern_atom symb)
+ raw_symbol oc (extern_atom symb)
let label oc lbl =
fprintf oc "L%d" lbl
@@ -1035,20 +1035,12 @@ let print_globdef oc (name, gdef) =
| Gvar v -> print_var oc name v
end)
-type target = ELF | MacOS | Cygwin
-
let print_program oc p =
- let target =
- match Configuration.system with
- | "macosx" -> MacOS
- | "linux" -> ELF
- | "bsd" -> ELF
- | "cygwin" -> Cygwin
- | _ -> invalid_arg ("System " ^ Configuration.system ^ " not supported") in
- let module Target = (val (match target with
- | MacOS -> (module MacOS_System:SYSTEM)
- | ELF -> (module ELF_System:SYSTEM)
- | Cygwin -> (module Cygwin_System:SYSTEM)):SYSTEM) in
+ let module Target = (val (match Configuration.system with
+ | "macosx" -> (module MacOS_System:SYSTEM)
+ | "linux" | "bsd" -> (module ELF_System:SYSTEM)
+ | "cygwin" -> (module Cygwin_System:SYSTEM)
+ | _ -> invalid_arg ("System " ^ Configuration.system ^ " not supported")):SYSTEM) in
let module Printer = AsmPrinter(Target) in
PrintAnnot.print_version_and_options oc Printer.comment;
PrintAnnot.reset_filenames();