From a82c9c0e4a0b8e37c9c3ea5ae99714982563606f Mon Sep 17 00:00:00 2001 From: xleroy Date: Sat, 14 Jan 2012 14:23:26 +0000 Subject: 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 --- cfrontend/Cshmgenproof.v | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'cfrontend/Cshmgenproof.v') 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 *) -- cgit