aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/TargetPrinter.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-02-18 15:06:53 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2015-02-18 15:06:53 +0100
commitfcd5ba10674f499d4e270bfb68fa40da8857fb47 (patch)
treeec56ae5a6b28f85fa1670342cf26032f4ed26d6f /powerpc/TargetPrinter.ml
parent71260eff997f5d3c25d9ccda92b8176c893be26d (diff)
downloadcompcert-kvx-fcd5ba10674f499d4e270bfb68fa40da8857fb47.tar.gz
compcert-kvx-fcd5ba10674f499d4e270bfb68fa40da8857fb47.zip
Added an elf prefix to all common elf functions in PrintAsmaux.
Diffstat (limited to 'powerpc/TargetPrinter.ml')
-rw-r--r--powerpc/TargetPrinter.ml23
1 files changed, 17 insertions, 6 deletions
diff --git a/powerpc/TargetPrinter.ml b/powerpc/TargetPrinter.ml
index e9c64ffc..964f75a7 100644
--- a/powerpc/TargetPrinter.ml
+++ b/powerpc/TargetPrinter.ml
@@ -26,6 +26,7 @@ open PrintAsmaux
module type SYSTEM =
sig
+ val comment: string
val constant: out_channel -> constant -> unit
val ireg: out_channel -> ireg -> unit
val freg: out_channel -> freg -> unit
@@ -39,6 +40,10 @@ module type SYSTEM =
val print_prologue: out_channel -> unit
end
+let symbol = elf_symbol
+
+let symbol_offset = elf_symbol_offset
+
let symbol_fragment oc s n op =
fprintf oc "(%a)%s" symbol_offset (s, n) op
@@ -66,6 +71,8 @@ let float_reg_name = function
module Linux_System : SYSTEM =
struct
+ let comment = "#"
+
let constant oc cst =
match cst with
| Cint n ->
@@ -129,7 +136,9 @@ module Linux_System : SYSTEM =
module Diab_System : SYSTEM =
struct
-
+
+ let comment = ";"
+
let constant oc cst =
match cst with
| Cint n ->
@@ -198,10 +207,13 @@ module Target (System : SYSTEM):TARGET =
include System
(* Basic printing functions *)
-
+ let symbol = symbol
+
let raw_symbol oc s =
fprintf oc "%s" s
+ let label = elf_label
+
let label_low oc lbl =
fprintf oc ".L%d@l" lbl
@@ -681,9 +693,8 @@ module Target (System : SYSTEM):TARGET =
fprintf oc " .long %a\n"
symbol_offset (symb, ofs)
- let comment = comment
-
- let print_fun_info = print_fun_info
+
+ let print_fun_info = elf_print_fun_info
let emit_constants oc lit =
if !float64_literals <> [] || !float32_literals <> [] then begin
@@ -703,7 +714,7 @@ module Target (System : SYSTEM):TARGET =
let reset_constants = reset_constants
- let print_var_info = print_var_info
+ let print_var_info = elf_print_var_info
let print_comm_symb oc sz name align =
fprintf oc " %s %a, %s, %d\n"