aboutsummaryrefslogtreecommitdiffstats
path: root/arm
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-02-24 16:43:38 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2012-02-24 16:43:38 +0000
commit62316a8e94d8cdcbf9e7aeadd1caf8e29507e6b0 (patch)
tree39b77b415e5387e8df643e18a206b7f1ffdaf329 /arm
parent91dcfe11ff321386f7924da053be83523073a50c (diff)
downloadcompcert-kvx-62316a8e94d8cdcbf9e7aeadd1caf8e29507e6b0.tar.gz
compcert-kvx-62316a8e94d8cdcbf9e7aeadd1caf8e29507e6b0.zip
Take advantage of Cmaskzero and Cmasknotzero.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1825 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'arm')
-rw-r--r--arm/SelectOp.vp2
-rw-r--r--arm/SelectOpproof.v15
2 files changed, 16 insertions, 1 deletions
diff --git a/arm/SelectOp.vp b/arm/SelectOp.vp
index 7b8851c9..27b5f536 100644
--- a/arm/SelectOp.vp
+++ b/arm/SelectOp.vp
@@ -454,4 +454,4 @@ Nondetfunction addressing (chunk: memory_chunk) (e: expr) :=
| _ => (Aindexed Int.zero, e:::Enil)
end.
-
+Definition cond_of_expr (e: expr) := (Ccompuimm Cne Int.zero, e:::Enil).
diff --git a/arm/SelectOpproof.v b/arm/SelectOpproof.v
index 0a5ee645..1a2f5606 100644
--- a/arm/SelectOpproof.v
+++ b/arm/SelectOpproof.v
@@ -769,4 +769,19 @@ Proof.
exists (v :: nil); split. eauto with evalexpr. subst. simpl. rewrite Int.add_zero; auto.
Qed.
+Theorem eval_cond_of_expr:
+ forall le a v b,
+ eval_expr ge sp e m le a v ->
+ Val.bool_of_val v b ->
+ match cond_of_expr a with (cond, args) =>
+ exists vl,
+ eval_exprlist ge sp e m le args vl /\
+ eval_condition cond vl m = Some b
+ end.
+Proof.
+ intros. unfold cond_of_expr; simpl.
+ exists (v :: nil); split; auto with evalexpr.
+ simpl. inversion H0; simpl. rewrite Int.eq_false; auto. auto. auto.
+Qed.
+
End CMCONSTR.