diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 2015-03-14 10:35:25 +0100 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 2015-03-14 10:35:25 +0100 |
commit | 890141acb930bdb6f985244f81833331382f7b66 (patch) | |
tree | cc32d6be06feaebca5076727f5531959e8e37530 /ia32/PrintAsm.ml | |
parent | 67e8b783c7e794d995675a332f118533e6a9b14a (diff) | |
parent | 3e01154d693e1c457e1e974f5e9ebaa4601050aa (diff) | |
download | compcert-890141acb930bdb6f985244f81833331382f7b66.tar.gz compcert-890141acb930bdb6f985244f81833331382f7b66.zip |
Merge branch 'master' into struct-passing
Diffstat (limited to 'ia32/PrintAsm.ml')
-rw-r--r-- | ia32/PrintAsm.ml | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/ia32/PrintAsm.ml b/ia32/PrintAsm.ml index 2ffd5600..0ca51173 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 @@ -128,9 +128,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 @@ -183,7 +183,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 @@ -1039,20 +1039,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(); |