aboutsummaryrefslogtreecommitdiffstats
path: root/cfrontend/Cop.v
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-06-16 06:56:02 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-06-16 06:56:02 +0000
commitb40e056328e183522b50c68aefdbff057bca29cc (patch)
treeb05fd2f0490e979e68ea06e1931bfcfba9b35771 /cfrontend/Cop.v
parent0648e79b98cc8d79e1942d15dbf05ba7b9eaaa8c (diff)
downloadcompcert-kvx-b40e056328e183522b50c68aefdbff057bca29cc.tar.gz
compcert-kvx-b40e056328e183522b50c68aefdbff057bca29cc.zip
Merge of the "princeton" branch:
- Define type "block" as "positive" instead of "Z". - Strengthen mem_unchanged_on so that the permissions are identical, instead of possibly increasing. - Move mem_unchanged_on from Events to Memory.Mem. - Define it in terms of mem_contents rather than in terms of Mem.load. - ExportClight: try to name temporaries introduced by SimplExpr - SimplExpr: avoid reusing temporaries between different functions, instead, thread a single generator through all functions. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2276 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/Cop.v')
-rw-r--r--cfrontend/Cop.v6
1 files changed, 3 insertions, 3 deletions
diff --git a/cfrontend/Cop.v b/cfrontend/Cop.v
index e7ffc891..4932bad4 100644
--- a/cfrontend/Cop.v
+++ b/cfrontend/Cop.v
@@ -604,7 +604,7 @@ Definition sem_sub (v1:val) (t1:type) (v2: val) (t2:type) : option val :=
| sub_case_pp ty => (**r pointer minus pointer *)
match v1,v2 with
| Vptr b1 ofs1, Vptr b2 ofs2 =>
- if zeq b1 b2 then
+ if eq_block b1 b2 then
if Int.eq (Int.repr (sizeof ty)) Int.zero then None
else Some (Vint (Int.divu (Int.sub ofs1 ofs2) (Int.repr (sizeof ty))))
else None
@@ -1059,8 +1059,8 @@ Proof.
+ inv H0; inv H1; inv H. TrivialInject.
econstructor. eauto. rewrite Int.sub_add_l. auto.
+ inv H0; inv H1; inv H. TrivialInject.
- destruct (zeq b1 b0); try discriminate. subst b1.
- rewrite H0 in H2; inv H2. rewrite zeq_true.
+ destruct (eq_block b1 b0); try discriminate. subst b1.
+ rewrite H0 in H2; inv H2. rewrite dec_eq_true.
destruct (Int.eq (Int.repr (sizeof ty)) Int.zero); inv H3.
rewrite Int.sub_shifted. TrivialInject.
+ inv H0; inv H1; inv H. TrivialInject.