aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/SimplExprproof.v
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2016-10-27 16:26:08 +0200
committerGitHub <noreply@github.com>2016-10-27 16:26:08 +0200
commit9922feea537ced718a3822dd50eabc87da060338 (patch)
tree6f67bb6707ef59e50d6bb81c61b2ed0b3c6097ab /cfrontend/SimplExprproof.v
parentf2d6637c7d4a11f961ff289e64f70bf4de93d0aa (diff)
parentd50773e537ec6729f9152b545c6f938ab19eb7b8 (diff)
downloadcompcert-9922feea537ced718a3822dd50eabc87da060338.tar.gz
compcert-9922feea537ced718a3822dd50eabc87da060338.zip
Merge pull request #145 from AbsInt/64
Support for 64-bit target processors + support for x86 in 64-bit mode
Diffstat (limited to 'cfrontend/SimplExprproof.v')
-rw-r--r--cfrontend/SimplExprproof.v22
1 files changed, 16 insertions, 6 deletions
diff --git a/cfrontend/SimplExprproof.v b/cfrontend/SimplExprproof.v
index 64e52df8..ad7b296a 100644
--- a/cfrontend/SimplExprproof.v
+++ b/cfrontend/SimplExprproof.v
@@ -736,9 +736,15 @@ Remark sem_cast_deterministic:
v1 = v2.
Proof.
unfold sem_cast; intros. destruct (classify_cast ty ty'); try congruence.
- destruct v; try congruence.
- destruct (Mem.weak_valid_pointer m1 b (Int.unsigned i)); inv H.
- destruct (Mem.weak_valid_pointer m2 b (Int.unsigned i)); inv H0.
+- destruct v; try congruence.
+ destruct Archi.ptr64; try discriminate.
+ destruct (Mem.weak_valid_pointer m1 b (Ptrofs.unsigned i)); inv H.
+ destruct (Mem.weak_valid_pointer m2 b (Ptrofs.unsigned i)); inv H0.
+ auto.
+- destruct v; try congruence.
+ destruct (negb Archi.ptr64); try discriminate.
+ destruct (Mem.weak_valid_pointer m1 b (Ptrofs.unsigned i)); inv H.
+ destruct (Mem.weak_valid_pointer m2 b (Ptrofs.unsigned i)); inv H0.
auto.
Qed.
@@ -756,9 +762,13 @@ Qed.
Lemma static_bool_val_sound:
forall v t m b, bool_val v t Mem.empty = Some b -> bool_val v t m = Some b.
Proof.
- intros until b; unfold bool_val. destruct (classify_bool t); destruct v; auto.
- intros E. unfold Mem.weak_valid_pointer, Mem.valid_pointer, proj_sumbool in E.
- rewrite ! pred_dec_false in E by (apply Mem.perm_empty). discriminate.
+ assert (A: forall b ofs, Mem.weak_valid_pointer Mem.empty b ofs = false).
+ { unfold Mem.weak_valid_pointer, Mem.valid_pointer, proj_sumbool; intros.
+ rewrite ! pred_dec_false by (apply Mem.perm_empty). auto. }
+ intros until b; unfold bool_val.
+ destruct (classify_bool t); destruct v; destruct Archi.ptr64 eqn:SF; auto.
+- rewrite A; congruence.
+- simpl; rewrite A; congruence.
Qed.
Lemma step_makeif: