aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-25 13:23:43 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-25 13:23:43 +0100
commite6a14b52554819995fed85c85a4acfedbb6ee3bc (patch)
tree69f14d9f161f0c914443d09565f6024711f3ad93 /mppa_k1c
parentbf1173b1609d04b8c99d1bdbcda4fffbb3745578 (diff)
downloadcompcert-kvx-e6a14b52554819995fed85c85a4acfedbb6ee3bc.tar.gz
compcert-kvx-e6a14b52554819995fed85c85a4acfedbb6ee3bc.zip
selectl
Diffstat (limited to 'mppa_k1c')
-rw-r--r--mppa_k1c/Asmblockgen.v7
-rw-r--r--mppa_k1c/Asmblockgenproof1.v14
2 files changed, 21 insertions, 0 deletions
diff --git a/mppa_k1c/Asmblockgen.v b/mppa_k1c/Asmblockgen.v
index 89f3bac2..6e025381 100644
--- a/mppa_k1c/Asmblockgen.v
+++ b/mppa_k1c/Asmblockgen.v
@@ -736,6 +736,13 @@ Definition transl_op
do rS <- ireg_of aS;
OK (Pcmove BTwnez r0 rS r1 ::i k)
+ | Oselectl, a0 :: a1 :: aS :: nil =>
+ assertion (mreg_eq a0 res);
+ do r0 <- ireg_of a0;
+ do r1 <- ireg_of a1;
+ do rS <- ireg_of aS;
+ OK (Pcmove BTwnez r0 rS r1 ::i k)
+
| _, _ =>
Error(msg "Asmgenblock.transl_op")
end.
diff --git a/mppa_k1c/Asmblockgenproof1.v b/mppa_k1c/Asmblockgenproof1.v
index 6239ed4a..a1bd7124 100644
--- a/mppa_k1c/Asmblockgenproof1.v
+++ b/mppa_k1c/Asmblockgenproof1.v
@@ -1669,6 +1669,20 @@ Opaque Int.eq.
destruct (Int.eq i Int.zero); simpl; rewrite Pregmap.gss; constructor.
* intros.
rewrite Pregmap.gso; congruence.
+- (* Oselectl *)
+ econstructor; split.
+ + eapply exec_straight_one.
+ simpl; reflexivity.
+ + split.
+ * unfold select.
+ destruct (rs x1) eqn:eqX1; try constructor.
+ destruct (rs x) eqn:eqX; try constructor.
+ destruct (rs x0) eqn:eqX0; try constructor.
+ simpl.
+ rewrite int_eq_comm.
+ destruct (Int.eq i Int.zero); simpl; rewrite Pregmap.gss; constructor.
+ * intros.
+ rewrite Pregmap.gso; congruence.
Qed.
(** Memory accesses *)