From 945e1e3c0e601f711ab83f65333f4c2b9e713c99 Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 22 Apr 2013 16:28:44 +0000 Subject: driver: removed option -flonglong test/c: added SHA3 cfrontend: support casts between long long and pointers, and comparisons between them. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2213 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/Cshmgenproof.v | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cfrontend/Cshmgenproof.v') diff --git a/cfrontend/Cshmgenproof.v b/cfrontend/Cshmgenproof.v index 7c24d0d0..00ed1f64 100644 --- a/cfrontend/Cshmgenproof.v +++ b/cfrontend/Cshmgenproof.v @@ -563,6 +563,18 @@ Proof. - inv MAKE. destruct (Val.cmpu_bool (Mem.valid_pointer m) cmp va vb) as [bv|] eqn:E; simpl in SEM; inv SEM. econstructor; eauto. simpl. unfold Val.cmpu. rewrite E. auto. +- inv MAKE. destruct vb; try discriminate. + set (vb := Vint (Int.repr (Int64.unsigned i))) in *. + destruct (Val.cmpu_bool (Mem.valid_pointer m) cmp va vb) as [bv|] eqn:E; + simpl in SEM; inv SEM. + econstructor; eauto with cshm. simpl. change (Vint (Int64.loword i)) with vb. + unfold Val.cmpu. rewrite E. auto. +- inv MAKE. destruct va; try discriminate. + set (va := Vint (Int.repr (Int64.unsigned i))) in *. + destruct (Val.cmpu_bool (Mem.valid_pointer m) cmp va vb) as [bv|] eqn:E; + simpl in SEM; inv SEM. + econstructor; eauto with cshm. simpl. change (Vint (Int64.loword i)) with va. + unfold Val.cmpu. rewrite E. auto. - eapply make_binarith_correct; eauto; intros; auto. Qed. -- cgit