diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-01-14 14:23:26 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2012-01-14 14:23:26 +0000 |
commit | a82c9c0e4a0b8e37c9c3ea5ae99714982563606f (patch) | |
tree | 93b9999698a4cd47ec4cb5fcdcdfd215d62f8e9e /cfrontend/Cshmgenproof.v | |
parent | bb8f49c419eb8205ef541edcbe17f4d14aa99564 (diff) | |
download | compcert-a82c9c0e4a0b8e37c9c3ea5ae99714982563606f.tar.gz compcert-a82c9c0e4a0b8e37c9c3ea5ae99714982563606f.zip |
Merge of the nonstrict-ops branch:
- Most RTL operators now evaluate to Some Vundef instead of None
when undefined behavior occurs.
- More aggressive instruction selection.
- "Bertotization" of pattern-matchings now implemented by a proper preprocessor.
- Cast optimization moved to cfrontend/Cminorgen; removed backend/CastOptim.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1790 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/Cshmgenproof.v')
-rw-r--r-- | cfrontend/Cshmgenproof.v | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cfrontend/Cshmgenproof.v b/cfrontend/Cshmgenproof.v index db5b7bc9..0f7810d2 100644 --- a/cfrontend/Cshmgenproof.v +++ b/cfrontend/Cshmgenproof.v @@ -441,11 +441,10 @@ Proof. exists (Vint n); split; auto. exists (Vptr b0 ofs); split; auto. constructor. exists (Vptr b0 ofs); split; auto. constructor. - rewrite <- Float.cmp_ne_eq. destruct (Float.cmp Cne f Float.zero) as []_eqn. - exists Vtrue; split. eapply eval_Ebinop; eauto with cshm. simpl. rewrite Heqb; auto. - constructor. apply Int.one_not_zero. - exists Vfalse; split. eapply eval_Ebinop; eauto with cshm. simpl. rewrite Heqb; auto. - constructor. + rewrite <- Float.cmp_ne_eq. + exists (Val.of_bool (Float.cmp Cne f Float.zero)); split. + econstructor; eauto with cshm. + destruct (Float.cmp Cne f Float.zero); simpl; constructor. apply Int.one_not_zero. Qed. Lemma make_neg_correct: @@ -607,15 +606,18 @@ Proof. inversion H8. eauto with cshm. (* pp ptr ptr *) inversion H10. eapply eval_Ebinop; eauto with cshm. - simpl. rewrite H3. unfold eq_block. rewrite H9. auto. + simpl. unfold Val.cmpu. simpl. rewrite H3. rewrite H9. auto. inversion H10. eapply eval_Ebinop; eauto with cshm. - simpl. rewrite H3. unfold eq_block. rewrite H9. auto. + simpl. unfold Val.cmpu. simpl. rewrite H3. rewrite H9. + destruct cmp; simpl in *; inv H; auto. (* pp ptr int *) inversion H9. eapply eval_Ebinop; eauto with cshm. - simpl. unfold eval_compare_null. rewrite H8. auto. + simpl. unfold Val.cmpu. simpl. rewrite H8. + destruct cmp; simpl in *; inv H; auto. (* pp int ptr *) inversion H9. eapply eval_Ebinop; eauto with cshm. - simpl. unfold eval_compare_null. rewrite H8. auto. + simpl. unfold Val.cmpu. simpl. rewrite H8. + destruct cmp; simpl in *; inv H; auto. (* ff *) inversion H8. eauto with cshm. (* if *) |