From 132e36fa0be63eb5672eda9168403d3fb74af2fa Mon Sep 17 00:00:00 2001 From: xleroy Date: Sat, 26 May 2012 07:32:01 +0000 Subject: CSE: add recognition of some combined operators, conditions, and addressing modes (cf. CombineOp.v) Memory model: cleaning up Memdata Inlining and new Constprop: updated for ARM. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1902 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- arm/Op.v | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'arm/Op.v') diff --git a/arm/Op.v b/arm/Op.v index a5502c01..3353416f 100644 --- a/arm/Op.v +++ b/arm/Op.v @@ -492,22 +492,20 @@ Definition negate_condition (cond: condition): condition := end. Lemma eval_negate_condition: - forall (cond: condition) (vl: list val) (b: bool) (m: mem), - eval_condition cond vl m = Some b -> - eval_condition (negate_condition cond) vl m = Some (negb b). + forall cond vl m, + eval_condition (negate_condition cond) vl m = option_map negb (eval_condition cond vl m). Proof. - intros. - destruct cond; simpl in H; FuncInv; simpl. - rewrite Val.negate_cmp_bool; rewrite H; auto. - rewrite Val.negate_cmpu_bool; rewrite H; auto. - rewrite Val.negate_cmp_bool; rewrite H; auto. - rewrite Val.negate_cmpu_bool; rewrite H; auto. - rewrite Val.negate_cmp_bool; rewrite H; auto. - rewrite Val.negate_cmpu_bool; rewrite H; auto. - rewrite H; auto. - destruct (Val.cmpf_bool c v v0); simpl in H; inv H. rewrite negb_elim; auto. - rewrite H; auto. - destruct (Val.cmpf_bool c v (Vfloat Float.zero)); simpl in H; inv H. rewrite negb_elim; auto. + intros. destruct cond; simpl. + repeat (destruct vl; auto). apply Val.negate_cmp_bool. + repeat (destruct vl; auto). apply Val.negate_cmpu_bool. + repeat (destruct vl; auto). apply Val.negate_cmp_bool. + repeat (destruct vl; auto). apply Val.negate_cmpu_bool. + repeat (destruct vl; auto). apply Val.negate_cmp_bool. + repeat (destruct vl; auto). apply Val.negate_cmpu_bool. + repeat (destruct vl; auto). + repeat (destruct vl; auto). destruct (Val.cmpf_bool c v v0); auto. destruct b; auto. + repeat (destruct vl; auto). + repeat (destruct vl; auto). destruct (Val.cmpf_bool c v (Vfloat Float.zero)); auto. destruct b; auto. Qed. (** Shifting stack-relative references. This is used in [Stacking]. *) -- cgit