summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-08-14 15:41:26 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2011-08-14 15:41:26 +0000
commit5aea6849eed83009e300b04ef17786643ead9cbc (patch)
treeeb9a329ce46a7ddc568a2fba7692b8eaea1e618f /backend
parentfd0f28867db2f183216b27d7030265ae9e887586 (diff)
Locations.v: add Loc.diff_dec.
ia32: lift restriction that 1st arg of ops cannot be ECX (could be useful for a future, better reloading strategy) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1711 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend')
-rw-r--r--backend/Locations.v9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/Locations.v b/backend/Locations.v
index 1270e1d..8a0b5ea 100644
--- a/backend/Locations.v
+++ b/backend/Locations.v
@@ -280,6 +280,15 @@ Module Loc.
apply overlap_aux_false_1. exact H0.
Qed.
+ Definition diff_dec (l1 l2: loc) : { Loc.diff l1 l2 } + {~Loc.diff l1 l2}.
+ Proof.
+ intros. case (eq l1 l2); intros.
+ right. rewrite e. apply same_not_diff.
+ case_eq (overlap l1 l2); intros.
+ right. apply overlap_not_diff; auto.
+ left. apply non_overlap_diff; auto.
+ Qed.
+
(** We now redefine some standard notions over lists, using the [Loc.diff]
predicate instead of standard disequality [<>].