aboutsummaryrefslogtreecommitdiffstats
path: root/riscV/Op.v
diff options
context:
space:
mode:
authorSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2020-10-17 17:03:07 +0200
committerSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2020-10-17 17:03:07 +0200
commit41a97a2d5eace2a0b113d7da590df69f1cc0d763 (patch)
tree9d5d00835078f7505229e052122c3d20e42b6bc5 /riscV/Op.v
parentdb3183cacb132d7153f653e2c3ae20b92ddfc03c (diff)
downloadcompcert-kvx-41a97a2d5eace2a0b113d7da590df69f1cc0d763.tar.gz
compcert-kvx-41a97a2d5eace2a0b113d7da590df69f1cc0d763.zip
proves op_valid_pointer_eq lemma for RISC-V (necessary for the pre-pass scheduler)
Diffstat (limited to 'riscV/Op.v')
-rw-r--r--riscV/Op.v10
1 files changed, 10 insertions, 0 deletions
diff --git a/riscV/Op.v b/riscV/Op.v
index 25214ddc..62999a2f 100644
--- a/riscV/Op.v
+++ b/riscV/Op.v
@@ -877,6 +877,16 @@ Proof.
unfold Val.cmpu_bool, Val.cmplu_bool; rewrite SF; reflexivity.
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; simpl; try congruence.
+ intros MEM; destruct cond; 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 :=