aboutsummaryrefslogtreecommitdiffstats
path: root/x86
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-11-25 09:41:41 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-11-25 09:41:41 +0100
commit2a579bf4ea76b49db979b2331f4557571d231412 (patch)
tree5240fb0ac7f5887478f1444064c977283baead72 /x86
parenta9677e1706d2a93be3cb8e3148abec924d0c3dbb (diff)
downloadcompcert-kvx-2a579bf4ea76b49db979b2331f4557571d231412.tar.gz
compcert-kvx-2a579bf4ea76b49db979b2331f4557571d231412.zip
pointer_eq copied
Diffstat (limited to 'x86')
-rw-r--r--x86/Op.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/x86/Op.v b/x86/Op.v
index 28e6dbd8..776f9495 100644
--- a/x86/Op.v
+++ b/x86/Op.v
@@ -1037,6 +1037,20 @@ Proof.
auto.
Qed.
+Lemma op_valid_pointer_eq:
+ forall (F V: Type) (ge: Genv.t F V) sp op args m1 m2,
+ (forall b z, Mem.valid_pointer m1 b z = Mem.valid_pointer m2 b z) ->
+ eval_operation ge sp op args m1 = eval_operation ge sp op args m2.
+Proof.
+ intros until m2. destruct op eqn:OP; simpl; try congruence.
+ - intros MEM; destruct cond; simpl; try congruence;
+ repeat (destruct args; simpl; try congruence);
+ erewrite cmpu_bool_valid_pointer_eq || erewrite cmplu_bool_valid_pointer_eq; eauto.
+ - intro MEM; destruct c; simpl; try congruence;
+ repeat (destruct args; simpl; try congruence);
+ erewrite cmpu_bool_valid_pointer_eq || erewrite cmplu_bool_valid_pointer_eq; eauto.
+Qed.
+
(** Global variables mentioned in an operation or addressing mode *)
Definition globals_addressing (addr: addressing) : list ident :=