aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/Asmblockgenproof1.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-05 09:40:45 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-05 09:40:45 +0200
commit57925286e8ba6055534cd0acbcf2b411366d3e0b (patch)
treec8dfba8a2a178a829e7c4dacc1782380befdd790 /mppa_k1c/Asmblockgenproof1.v
parent483d0e37880dbe44af3dafdcac9b1110a37139c4 (diff)
downloadcompcert-kvx-57925286e8ba6055534cd0acbcf2b411366d3e0b.tar.gz
compcert-kvx-57925286e8ba6055534cd0acbcf2b411366d3e0b.zip
selectl with condition
Diffstat (limited to 'mppa_k1c/Asmblockgenproof1.v')
-rw-r--r--mppa_k1c/Asmblockgenproof1.v65
1 files changed, 56 insertions, 9 deletions
diff --git a/mppa_k1c/Asmblockgenproof1.v b/mppa_k1c/Asmblockgenproof1.v
index 1cb75c4c..874e40a8 100644
--- a/mppa_k1c/Asmblockgenproof1.v
+++ b/mppa_k1c/Asmblockgenproof1.v
@@ -1698,20 +1698,67 @@ Opaque Int.eq.
* intros.
rewrite Pregmap.gso; congruence.
-- (* Oselectl *)
- econstructor; split.
- + eapply exec_straight_one.
- simpl; reflexivity.
+- (* Oselect *)
+ destruct cond in *; simpl in *; try congruence;
+ try monadInv EQ3;
+ try (injection EQ3; clear EQ3; intro Hrew; rewrite <- Hrew in * ; clear Hrew);
+ econstructor; split;
+ try ( eapply exec_straight_one; simpl; reflexivity ).
+ (* Cmp *)
+ split.
- * unfold eval_selectl.
- destruct (rs x1) eqn:eqX1; try constructor.
+ * unfold eval_select.
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.
+ destruct c0 in *; simpl;
+ destruct (Val.cmp_bool _ _); simpl; try constructor;
+ destruct b; simpl; rewrite Pregmap.gss; constructor.
* intros.
rewrite Pregmap.gso; congruence.
+ (* Cmpu *)
+ + split.
+ * unfold eval_select.
+ destruct (rs x) eqn:eqX; try constructor.
+ destruct (rs x0) eqn:eqX0; try constructor.
+ destruct c0 in *; simpl in *; inv EQ2; simpl.
+ ** assert (Hcmpuabs := (Val_cmpu_bool_correct m Ceq (rs x1) (Vint Int.zero))).
+ destruct (Val.cmpu_bool _ _); simpl; try constructor.
+ destruct b in *; simpl in *; [ rewrite (Hcmpuabs true) | rewrite (Hcmpuabs false)]; trivial;
+ rewrite Pregmap.gss; constructor.
+ ** assert (Hcmpuabs := (Val_cmpu_bool_correct m Cne (rs x1) (Vint Int.zero))).
+ destruct (Val.cmpu_bool _ _); simpl; try constructor.
+ destruct b in *; simpl in *; [ rewrite (Hcmpuabs true) | rewrite (Hcmpuabs false)]; trivial;
+ rewrite Pregmap.gss; constructor.
+ * intros.
+ rewrite Pregmap.gso; congruence.
+
+ (* Cmpl *)
+ + split.
+ * unfold eval_select.
+ destruct (rs x) eqn:eqX; try constructor.
+ destruct (rs x0) eqn:eqX0; try constructor.
+ destruct c0 in *; simpl;
+ destruct (Val.cmpl_bool _ _); simpl; try constructor;
+ destruct b; simpl; rewrite Pregmap.gss; constructor.
+ * intros.
+ rewrite Pregmap.gso; congruence.
+
+ (* Cmplu *)
+ + split.
+ * unfold eval_select.
+ destruct (rs x) eqn:eqX; try constructor.
+ destruct (rs x0) eqn:eqX0; try constructor.
+ destruct c0 in *; simpl in *; inv EQ2; simpl.
+ ** assert (Hcmpluabs := (Val_cmplu_bool_correct m Ceq (rs x1) (Vlong Int64.zero))).
+ destruct (Val.cmplu_bool _ _); simpl; try constructor.
+ destruct b in *; simpl in *; [ rewrite (Hcmpluabs true) | rewrite (Hcmpluabs false)]; trivial;
+ rewrite Pregmap.gss; constructor.
+ ** assert (Hcmpluabs := (Val_cmplu_bool_correct m Cne (rs x1) (Vlong Int64.zero))).
+ destruct (Val.cmplu_bool _ _); simpl; try constructor.
+ destruct b in *; simpl in *; [ rewrite (Hcmpluabs true) | rewrite (Hcmpluabs false)]; trivial;
+ rewrite Pregmap.gss; constructor.
+ * intros.
+ rewrite Pregmap.gso; congruence.
+
- (* Oselectf *)
econstructor; split.
+ eapply exec_straight_one.