aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/PostpassSchedulingOracle.ml
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-06-04 21:16:40 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-06-04 21:16:40 +0200
commitac366a59308ae85a0cbfefb8b9be79763d5c5f91 (patch)
treeb533ea1790cf2b169c98e6af707b7e98b39869ac /mppa_k1c/PostpassSchedulingOracle.ml
parented95a6a6fbdd915e361e696d4bf72e5a545b965e (diff)
downloadcompcert-kvx-ac366a59308ae85a0cbfefb8b9be79763d5c5f91.tar.gz
compcert-kvx-ac366a59308ae85a0cbfefb8b9be79763d5c5f91.zip
added immediate cmove
Diffstat (limited to 'mppa_k1c/PostpassSchedulingOracle.ml')
-rw-r--r--mppa_k1c/PostpassSchedulingOracle.ml20
1 files changed, 15 insertions, 5 deletions
diff --git a/mppa_k1c/PostpassSchedulingOracle.ml b/mppa_k1c/PostpassSchedulingOracle.ml
index af1e8f85..78af896a 100644
--- a/mppa_k1c/PostpassSchedulingOracle.ml
+++ b/mppa_k1c/PostpassSchedulingOracle.ml
@@ -154,7 +154,17 @@ let arith_arrr_str = function
| Pmsubl -> "Pmsubl"
| Pcmove _ -> "Pcmove"
| Pcmoveu _ -> "Pcmoveu"
-
+
+let arith_arri32_str = function
+ | Pmaddiw -> "Pmaddiw"
+ | Pcmoveiw _ -> "Pcmoveiw"
+ | Pcmoveuiw _ -> "Pcmoveuiw"
+
+let arith_arri64_str = function
+ | Pmaddil -> "Pmaddil"
+ | Pcmoveil _ -> "Pcmoveil"
+ | Pcmoveuil _ -> "Pcmoveuil"
+
let arith_ri32_str = "Pmake"
let arith_ri64_str = "Pmakel"
@@ -194,9 +204,9 @@ let arith_rri64_rec i rd rs imm64 = { inst = arith_rri64_str i; write_locs = [Re
let arith_rrr_rec i rd rs1 rs2 = { inst = arith_rrr_str i; write_locs = [Reg rd]; read_locs = [Reg rs1; Reg rs2]; imm = None; is_control = false}
-let arith_arri32_rec i rd rs imm32 = { inst = "Pmaddiw"; write_locs = [Reg rd]; read_locs = [Reg rd; Reg rs]; imm = imm32; is_control = false }
+let arith_arri32_rec i rd rs imm32 = { inst = arith_arri32_str i; write_locs = [Reg rd]; read_locs = [Reg rd; Reg rs]; imm = imm32; is_control = false }
-let arith_arri64_rec i rd rs imm64 = { inst = "Pmaddil"; write_locs = [Reg rd]; read_locs = [Reg rd; Reg rs]; imm = imm64; is_control = false }
+let arith_arri64_rec i rd rs imm64 = { inst = arith_arri64_str i; write_locs = [Reg rd]; read_locs = [Reg rd; Reg rs]; imm = imm64; is_control = false }
let arith_arr_rec i rd rs = { inst = arith_arr_str i; write_locs = [Reg rd]; read_locs = [Reg rd; Reg rs]; imm = None; is_control = false}
@@ -215,8 +225,8 @@ let arith_rec i =
| PArithRRR (i, rd, rs1, rs2) -> arith_rrr_rec i (IR rd) (IR rs1) (IR rs2)
| PArithARR (i, rd, rs) -> arith_arr_rec i (IR rd) (IR rs)
(* Seems like single constant constructor types are elided *)
- | PArithARRI32 ((* i,*) rd, rs, imm32) -> arith_arri32_rec () (IR rd) (IR rs) (Some (I32 imm32))
- | PArithARRI64 ((* i,*) rd, rs, imm64) -> arith_arri64_rec () (IR rd) (IR rs) (Some (I64 imm64))
+ | PArithARRI32 (i, rd, rs, imm32) -> arith_arri32_rec i (IR rd) (IR rs) (Some (I32 imm32))
+ | PArithARRI64 (i, rd, rs, imm64) -> arith_arri64_rec i (IR rd) (IR rs) (Some (I64 imm64))
| PArithARRR (i, rd, rs1, rs2) -> arith_arrr_rec i (IR rd) (IR rs1) (IR rs2)
| PArithRI32 (rd, imm32) -> { inst = arith_ri32_str; write_locs = [Reg (IR rd)]; read_locs = []; imm = (Some (I32 imm32)) ; is_control = false}
| PArithRI64 (rd, imm64) -> { inst = arith_ri64_str; write_locs = [Reg (IR rd)]; read_locs = []; imm = (Some (I64 imm64)) ; is_control = false}