diff options
Diffstat (limited to 'arm/CombineOpproof.v')
-rw-r--r-- | arm/CombineOpproof.v | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arm/CombineOpproof.v b/arm/CombineOpproof.v index 485857b9..cb30e956 100644 --- a/arm/CombineOpproof.v +++ b/arm/CombineOpproof.v @@ -10,7 +10,7 @@ (* *) (* *********************************************************************) -(** Recognition of combined operations, addressing modes and conditions +(** Recognition of combined operations, addressing modes and conditions during the [CSE] phase. *) Require Import Coqlib. @@ -36,7 +36,7 @@ Hypothesis get_sound: forall v rhs, get v = Some rhs -> rhs_eval_to valu ge sp m Lemma get_op_sound: forall v op vl, get v = Some (Op op vl) -> eval_operation ge sp op (map valu vl) m = Some (valu v). Proof. - intros. exploit get_sound; eauto. intros REV; inv REV; auto. + intros. exploit get_sound; eauto. intros REV; inv REV; auto. Qed. Ltac UseGetSound := @@ -44,7 +44,7 @@ Ltac UseGetSound := | [ H: get _ = Some _ |- _ ] => let x := fresh "EQ" in (generalize (get_op_sound _ _ _ H); intros x; simpl in x; FuncInv) end. - + Lemma combine_compimm_ne_0_sound: forall x cond args, combine_compimm_ne_0 get x = Some(cond, args) -> @@ -53,7 +53,7 @@ Lemma combine_compimm_ne_0_sound: Proof. intros until args. functional induction (combine_compimm_ne_0 get x); intros EQ; inv EQ. (* of cmp *) - UseGetSound. rewrite <- H. + UseGetSound. rewrite <- H. destruct (eval_condition cond (map valu args) m); simpl; auto. destruct b; auto. Qed. @@ -65,8 +65,8 @@ Lemma combine_compimm_eq_0_sound: Proof. intros until args. functional induction (combine_compimm_eq_0 get x); intros EQ; inv EQ. (* of cmp *) - UseGetSound. rewrite <- H. - rewrite eval_negate_condition. + UseGetSound. rewrite <- H. + rewrite eval_negate_condition. destruct (eval_condition c (map valu args) m); simpl; auto. destruct b; auto. Qed. @@ -78,7 +78,7 @@ Lemma combine_compimm_eq_1_sound: Proof. intros until args. functional induction (combine_compimm_eq_1 get x); intros EQ; inv EQ. (* of cmp *) - UseGetSound. rewrite <- H. + UseGetSound. rewrite <- H. destruct (eval_condition cond (map valu args) m); simpl; auto. destruct b; auto. Qed. @@ -90,7 +90,7 @@ Lemma combine_compimm_ne_1_sound: Proof. intros until args. functional induction (combine_compimm_ne_1 get x); intros EQ; inv EQ. (* of cmp *) - UseGetSound. rewrite <- H. + UseGetSound. rewrite <- H. rewrite eval_negate_condition. destruct (eval_condition c (map valu args) m); simpl; auto. destruct b; auto. Qed. @@ -126,7 +126,7 @@ Theorem combine_addr_sound: Proof. intros. functional inversion H; subst. (* indexed - addimm *) - UseGetSound. simpl. rewrite <- H0. rewrite Val.add_assoc. auto. + UseGetSound. simpl. rewrite <- H0. rewrite Val.add_assoc. auto. Qed. Theorem combine_op_sound: @@ -149,10 +149,10 @@ Transparent Val.sub. destruct v; simpl; auto. repeat rewrite Int.sub_add_opp. rewrite Int.add_assoc. rewrite Int.neg_add_distr. decEq. decEq. decEq. apply Int.add_commut. (* andimm - andimm *) - UseGetSound; simpl. - generalize (Int.eq_spec p m0); rewrite H7; intros. + UseGetSound; simpl. + generalize (Int.eq_spec p m0); rewrite H7; intros. rewrite <- H0. rewrite Val.and_assoc. simpl. fold p. rewrite H1. auto. - UseGetSound; simpl. + UseGetSound; simpl. rewrite <- H0. rewrite Val.and_assoc. auto. (* orimm - orimm *) UseGetSound. simpl. rewrite <- H0. rewrite Val.or_assoc. auto. |