aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-29 00:25:01 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-29 00:25:01 +0200
commit83cc11add90eea576a798bacf821a70a28d4d9cc (patch)
tree5d2efb01d6e52ac552af8fa57d88bbc86ffed807
parent371ff944e3377b263506f57c71b54ea24d1f75a7 (diff)
downloadcompcert-kvx-83cc11add90eea576a798bacf821a70a28d4d9cc.tar.gz
compcert-kvx-83cc11add90eea576a798bacf821a70a28d4d9cc.zip
to be able to use DDR we need 8-byte pointers in jump tables
-rw-r--r--mppa_k1c/TargetPrinter.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/mppa_k1c/TargetPrinter.ml b/mppa_k1c/TargetPrinter.ml
index 15f05960..96779517 100644
--- a/mppa_k1c/TargetPrinter.ml
+++ b/mppa_k1c/TargetPrinter.ml
@@ -173,10 +173,10 @@ module Target (*: TARGET*) =
(* Associate labels to floating-point constants and to symbols. *)
let print_tbl oc (lbl, tbl) =
- fprintf oc " .balign 4\n";
+ fprintf oc " .balign 8\n";
fprintf oc "%a:\n" label lbl;
List.iter
- (fun l -> fprintf oc " .4byte %a\n"
+ (fun l -> fprintf oc " .8byte %a\n"
print_label l)
tbl
@@ -408,9 +408,9 @@ module Target (*: TARGET*) =
fprintf oc "%s jumptable [ " comment;
List.iter (fun l -> fprintf oc "%a " print_label l) tbl;
fprintf oc "]\n";
- fprintf oc " make %a = %a\n ;;\n" ireg base_reg label lbl;
- fprintf oc " lwz.xs %a = %a[%a]\n ;;\n" ireg base_reg ireg idx_reg ireg base_reg;
- fprintf oc " igoto %a\n ;;\n" ireg base_reg;
+ fprintf oc " make %a = %a\n ;;\n" ireg base_reg label lbl;
+ fprintf oc " ld.xs %a = %a[%a]\n ;;\n" ireg base_reg ireg idx_reg ireg base_reg;
+ fprintf oc " igoto %a\n ;;\n" ireg base_reg;
section oc Section_jumptable;
print_tbl oc (lbl, tbl);
section oc Section_text