summaryrefslogtreecommitdiff
path: root/cfrontend/Cshmgenproof.v
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-04-22 16:28:44 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-04-22 16:28:44 +0000
commit945e1e3c0e601f711ab83f65333f4c2b9e713c99 (patch)
tree1253f0d42b4a90d3bb19730c66e53519573296cb /cfrontend/Cshmgenproof.v
parentad19ac07d798f16ab72d269010de8724353512e8 (diff)
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
Diffstat (limited to 'cfrontend/Cshmgenproof.v')
-rw-r--r--cfrontend/Cshmgenproof.v12
1 files changed, 12 insertions, 0 deletions
diff --git a/cfrontend/Cshmgenproof.v b/cfrontend/Cshmgenproof.v
index 7c24d0d..00ed1f6 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.