diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2021-06-11 10:58:24 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2021-06-11 10:58:24 +0200 |
commit | a949df2284be7292609ff209ec7547f8560dc43c (patch) | |
tree | 72ff8e6b940fcdc1225e639e8e79cce40471191a /x86 | |
parent | d703ae1ad5e1fcdc63e07b2a50a3e8576a11e61e (diff) | |
parent | a0ad5ff6f9c7603610a7448935b36c9ed22c6435 (diff) | |
download | compcert-kvx-a949df2284be7292609ff209ec7547f8560dc43c.tar.gz compcert-kvx-a949df2284be7292609ff209ec7547f8560dc43c.zip |
Merge branch 'master' of https://github.com/AbsInt/CompCert into kvx-work
fix for comments on x86-64 MacOS
Diffstat (limited to 'x86')
-rw-r--r-- | x86/TargetPrinter.ml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/x86/TargetPrinter.ml b/x86/TargetPrinter.ml index 50c871e4..00e70f65 100644 --- a/x86/TargetPrinter.ml +++ b/x86/TargetPrinter.ml @@ -95,9 +95,6 @@ let z oc n = output_string oc (Z.to_string n) let data_pointer = if Archi.ptr64 then ".quad" else ".long" -(* The comment deliminiter *) -let comment = "##" - (* Base-2 log of a Caml integer *) let rec log2 n = assert (n > 0); @@ -106,6 +103,7 @@ let rec log2 n = (* System dependent printer functions *) module type SYSTEM = sig + val comment: string val raw_symbol: out_channel -> string -> unit val symbol: out_channel -> P.t -> unit val label: out_channel -> int -> unit @@ -124,6 +122,9 @@ module type SYSTEM = module ELF_System : SYSTEM = struct + (* The comment delimiter *) + let comment = "#" + let raw_symbol oc s = fprintf oc "%s" s @@ -219,6 +220,10 @@ module ELF_System : SYSTEM = module MacOS_System : SYSTEM = struct + (* The comment delimiter. + `##` instead of `#` to please the Clang assembler. *) + let comment = "##" + let raw_symbol oc s = fprintf oc "_%s" s @@ -280,6 +285,9 @@ module MacOS_System : SYSTEM = module Cygwin_System : SYSTEM = struct + (* The comment delimiter *) + let comment = "#" + let symbol_prefix = if Archi.ptr64 then "" else "_" |