aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/TargetPrinter.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-10-20 13:32:18 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-10-20 13:32:18 +0200
commit4d542bc7eafadb16b845cf05d1eb4988eb55ed0f (patch)
tree1961b41815fc6e392cc0bd2beeb0fb504bc160ce /powerpc/TargetPrinter.ml
parent7a6bb90048db7a254e959b1e3c308bac5fe6c418 (diff)
downloadcompcert-kvx-4d542bc7eafadb16b845cf05d1eb4988eb55ed0f.tar.gz
compcert-kvx-4d542bc7eafadb16b845cf05d1eb4988eb55ed0f.zip
Updated PR by removing whitespaces. Bug 17450.
Diffstat (limited to 'powerpc/TargetPrinter.ml')
-rw-r--r--powerpc/TargetPrinter.ml70
1 files changed, 35 insertions, 35 deletions
diff --git a/powerpc/TargetPrinter.ml b/powerpc/TargetPrinter.ml
index 7dbc2cf5..74eb8776 100644
--- a/powerpc/TargetPrinter.ml
+++ b/powerpc/TargetPrinter.ml
@@ -103,15 +103,15 @@ module Linux_System : SYSTEM =
let freg oc r =
output_string oc (float_reg_name r)
-
- let creg oc r =
+
+ let creg oc r =
fprintf oc "%d" r
-
+
let name_of_section = function
| Section_text -> ".text"
| Section_data i ->
if i then ".data" else "COMM"
- | Section_small_data i ->
+ | Section_small_data i ->
if i then ".section .sdata,\"aw\",@progbits" else "COMM"
| Section_const i ->
if i then ".rodata" else "COMM"
@@ -137,17 +137,17 @@ module Linux_System : SYSTEM =
let print_file_line oc file line =
print_file_line oc comment file line
-
- (* Emit .cfi directives *)
+
+ (* Emit .cfi directives *)
let cfi_startproc = cfi_startproc
let cfi_endproc = cfi_endproc
-
+
let cfi_adjust = cfi_adjust
-
+
let cfi_rel_offset = cfi_rel_offset
- let print_prologue oc =
+ let print_prologue oc =
if !Clflags.option_g then begin
section oc Section_text;
let low_pc = new_label () in
@@ -168,7 +168,7 @@ module Linux_System : SYSTEM =
let debug_section _ _ = ()
end
-
+
module Diab_System : SYSTEM =
struct
@@ -188,7 +188,7 @@ module Diab_System : SYSTEM =
symbol_fragment oc s n "@sdax@l"
| Csymbol_rel_high(s, n) ->
symbol_fragment oc s n "@sdarx@ha"
-
+
let ireg oc r =
output_char oc 'r';
output_string oc (int_reg_name r)
@@ -196,10 +196,10 @@ module Diab_System : SYSTEM =
let freg oc r =
output_char oc 'f';
output_string oc (float_reg_name r)
-
+
let creg oc r =
fprintf oc "cr%d" r
-
+
let name_of_section = function
| Section_text -> ".text"
| Section_data i -> if i then ".data" else "COMM"
@@ -247,20 +247,20 @@ module Diab_System : SYSTEM =
let debug_section oc sec =
match sec with
- | Section_debug_abbrev
+ | Section_debug_abbrev
| Section_debug_info _
| Section_debug_loc -> ()
| sec ->
let name = match sec with
| Section_user (name,_,_) -> name
| _ -> name_of_section sec in
- if not (Debug.exists_section name) then
+ if not (Debug.exists_section name) then
let line_start = new_label ()
and low_pc = new_label ()
and debug_info = new_label () in
Debug.add_diab_info name (line_start,debug_info,name_of_section sec);
Debug.add_compilation_section_start name low_pc;
- let line_name = ".debug_line" ^(if name <> ".text" then name else "") in
+ let line_name = ".debug_line" ^(if name <> ".text" then name else "") in
fprintf oc " .section %s,,n\n" line_name;
if name <> ".text" then
fprintf oc " .sectionlink .debug_line\n";
@@ -271,18 +271,18 @@ module Diab_System : SYSTEM =
fprintf oc " .d2_line_start %s\n" line_name
else
()
-
+
let print_prologue oc =
fprintf oc " .xopt align-fill-text=0x60000000\n";
debug_section oc Section_text
let print_epilogue oc =
- let end_label sec =
+ let end_label sec =
fprintf oc "\n";
fprintf oc " %s\n" sec;
let label_end = new_label () in
fprintf oc "%a:\n" label label_end;
- label_end
+ label_end
and entry_label f =
let label = new_label () in
fprintf oc ".L%d: .d2filenum \"%s\"\n" label f;
@@ -298,7 +298,7 @@ module Target (System : SYSTEM):TARGET =
(* Basic printing functions *)
let symbol = symbol
-
+
let raw_symbol oc s =
fprintf oc "%s" s
@@ -363,7 +363,7 @@ module Target (System : SYSTEM):TARGET =
let short_cond_branch tbl pc lbl_dest =
match PTree.get lbl_dest tbl with
| None -> assert false
- | Some pc_dest ->
+ | Some pc_dest ->
let disp = pc_dest - pc in -0x2000 <= disp && disp < 0x2000
(* Printing of instructions *)
@@ -531,11 +531,11 @@ module Target (System : SYSTEM):TARGET =
| Pfnmsub(r1, r2, r3, r4) ->
fprintf oc " fnmsub %a, %a, %a, %a\n" freg r1 freg r2 freg r3 freg r4
| Pfsqrt(r1, r2) ->
- fprintf oc " fsqrt %a, %a\n" freg r1 freg r2
+ fprintf oc " fsqrt %a, %a\n" freg r1 freg r2
| Pfrsqrte(r1, r2) ->
- fprintf oc " frsqrte %a, %a\n" freg r1 freg r2
+ fprintf oc " frsqrte %a, %a\n" freg r1 freg r2
| Pfres(r1, r2) ->
- fprintf oc " fres %a, %a\n" freg r1 freg r2
+ fprintf oc " fres %a, %a\n" freg r1 freg r2
| Pfsel(r1, r2, r3, r4) ->
fprintf oc " fsel %a, %a, %a, %a\n" freg r1 freg r2 freg r3 freg r4
| Pisel (r1,r2,r3,cr) ->
@@ -768,7 +768,7 @@ module Target (System : SYSTEM):TARGET =
let nlo = Int64.to_int32 n
and nhi = Int64.to_int32(Int64.shift_right_logical n 32) in
fprintf oc "%a: .long 0x%lx, 0x%lx\n" label lbl nhi nlo
-
+
let print_literal32 oc (lbl, n) =
fprintf oc "%a: .long 0x%lx\n" label lbl n
@@ -798,10 +798,10 @@ module Target (System : SYSTEM):TARGET =
if Z.gt n Z.zero then
fprintf oc " .space %s\n" (Z.to_string n)
| Init_addrof(symb, ofs) ->
- fprintf oc " .long %a\n"
+ fprintf oc " .long %a\n"
symbol_offset (symb, ofs)
-
+
let print_fun_info = elf_print_fun_info
let emit_constants oc lit =
@@ -815,26 +815,26 @@ module Target (System : SYSTEM):TARGET =
let print_optional_fun_info _ = ()
- let get_section_names name =
+ let get_section_names name =
match C2C.atom_sections name with
| [t;l;j] -> (t, l, j)
| _ -> (Section_text, Section_literal, Section_jumptable)
-
+
let reset_constants = reset_constants
-
+
let print_var_info = elf_print_var_info
- let print_comm_symb oc sz name align =
+ let print_comm_symb oc sz name align =
fprintf oc " %s %a, %s, %d\n"
(if C2C.atom_is_static name then ".lcomm" else ".comm")
symbol name
(Z.to_string sz)
align
-
+
let print_align oc align =
fprintf oc " .balign %d\n" align
- let print_jumptable oc jmptbl =
+ let print_jumptable oc jmptbl =
let print_jumptable oc (lbl, tbl) =
fprintf oc "%a:" label lbl;
List.iter
@@ -849,7 +849,7 @@ module Target (System : SYSTEM):TARGET =
let default_falignment = 4
- let new_label = new_label
+ let new_label = new_label
let section oc sec =
section oc sec;
@@ -857,7 +857,7 @@ module Target (System : SYSTEM):TARGET =
end
let sel_target () =
- let module S = (val
+ let module S = (val
(match Configuration.system with
| "linux" -> (module Linux_System:SYSTEM)
| "diab" -> (module Diab_System:SYSTEM)