aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/PostpassSchedulingOracle.ml
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-03 11:17:57 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-05-03 11:17:57 +0200
commita289d73e791be5a760c8a9b2f3de2064f001a770 (patch)
treee106a015b1eb2a33a107135267da9d73243d0215 /mppa_k1c/PostpassSchedulingOracle.ml
parente1c864b670812eda55e0ee129855c69d32c8b84a (diff)
downloadcompcert-kvx-a289d73e791be5a760c8a9b2f3de2064f001a770.tar.gz
compcert-kvx-a289d73e791be5a760c8a9b2f3de2064f001a770.zip
use sq to save pairs of registers
Diffstat (limited to 'mppa_k1c/PostpassSchedulingOracle.ml')
-rw-r--r--mppa_k1c/PostpassSchedulingOracle.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/mppa_k1c/PostpassSchedulingOracle.ml b/mppa_k1c/PostpassSchedulingOracle.ml
index c944774a..f88acb44 100644
--- a/mppa_k1c/PostpassSchedulingOracle.ml
+++ b/mppa_k1c/PostpassSchedulingOracle.ml
@@ -446,7 +446,7 @@ type real_instruction =
| Make | Nop | Extfz | Extfs | Insf
(* LSU *)
| Lbs | Lbz | Lhs | Lhz | Lws | Ld
- | Sb | Sh | Sw | Sd
+ | Sb | Sh | Sw | Sd | Sq
(* BCU *)
| Icall | Call | Cb | Igoto | Goto | Ret | Get | Set
(* FPU *)
@@ -523,6 +523,7 @@ let ab_inst_to_real = function
| "Psh" -> Sh
| "Psw" | "Psw_a" | "Pfss" -> Sw
| "Psd" | "Psd_a" | "Pfsd" -> Sd
+ | "Psq" -> Sq
| "Pcb" | "Pcbu" -> Cb
| "Pcall" | "Pdiv" | "Pdivu" -> Call
@@ -543,6 +544,9 @@ let ab_inst_to_real = function
| "Pfsbfw" -> Fsbfw
| "Pfmuld" -> Fmuld
| "Pfmulw" -> Fmulw
+
+ | "nop" -> Nop
+
| s -> failwith @@ sprintf "ab_inst_to_real: unrecognized instruction: %s" s
exception InvalidEncoding
@@ -595,7 +599,7 @@ let rec_to_usage r =
(match encoding with None | Some U6 | Some S10 -> lsu_data
| Some U27L5 | Some U27L10 -> lsu_data_x
| Some E27U27L10 -> lsu_data_y)
- | Sb | Sh | Sw | Sd ->
+ | Sb | Sh | Sw | Sd | Sq ->
(match encoding with None | Some U6 | Some S10 -> lsu_acc
| Some U27L5 | Some U27L10 -> lsu_acc_x
| Some E27U27L10 -> lsu_acc_y)
@@ -617,7 +621,7 @@ let real_inst_to_latency = function
| Floatwz | Floatuwz | Fixeduwz | Fixedwz | Floatdz | Floatudz | Fixeddz | Fixedudz -> 4
| Mulw | Muld | Maddw | Maddd -> 2 (* FIXME - WORST CASE. If it's S10 then it's only 1 *)
| Lbs | Lbz | Lhs | Lhz | Lws | Ld -> 3
- | Sb | Sh | Sw | Sd -> 1 (* See k1c-Optimization.pdf page 19 *)
+ | Sb | Sh | Sw | Sd | Sq -> 1 (* See k1c-Optimization.pdf page 19 *)
| Get -> 1
| Set -> 4 (* According to the manual should be 3, but I measured 4 *)
| Icall | Call | Cb | Igoto | Goto | Ret -> 42 (* Should not matter since it's the final instruction of the basic block *)