diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-24 16:43:38 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-02-24 16:43:38 +0000 |
commit | 62316a8e94d8cdcbf9e7aeadd1caf8e29507e6b0 (patch) | |
tree | 39b77b415e5387e8df643e18a206b7f1ffdaf329 /ia32/SelectOpproof.v | |
parent | 91dcfe11ff321386f7924da053be83523073a50c (diff) | |
download | compcert-62316a8e94d8cdcbf9e7aeadd1caf8e29507e6b0.tar.gz compcert-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 'ia32/SelectOpproof.v')
-rw-r--r-- | ia32/SelectOpproof.v | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ia32/SelectOpproof.v b/ia32/SelectOpproof.v index e6fd8098..658a7550 100644 --- a/ia32/SelectOpproof.v +++ b/ia32/SelectOpproof.v @@ -753,4 +753,27 @@ Proof. exists (v :: nil); split. constructor; auto. constructor. 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 until v. unfold cond_of_expr; case (cond_of_expr_match a); intros; InvEval. + subst v. exists (v1 :: nil); split; auto with evalexpr. + simpl. destruct b. + generalize (Val.bool_of_true_val2 _ H0); clear H0; intro ISTRUE. + destruct v1; simpl in ISTRUE; try contradiction. + rewrite Int.eq_false; auto. + generalize (Val.bool_of_false_val2 _ H0); clear H0; intro ISFALSE. + destruct v1; simpl in ISFALSE; try contradiction. + rewrite ISFALSE. rewrite Int.eq_true; auto. + exists (v :: nil); split; auto with evalexpr. + simpl. inversion H0; simpl. rewrite Int.eq_false; auto. auto. auto. +Qed. + End CMCONSTR. |