aboutsummaryrefslogtreecommitdiffstats
path: root/aarch64/Asmgenproof.v
diff options
context:
space:
mode:
authorLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2020-12-20 14:30:47 +0100
committerLéo Gourdin <leo.gourdin@univ-grenoble-alpes.fr>2020-12-20 14:30:47 +0100
commit373ad4a6efcb6cd0ecd30e7c131640b9783f1269 (patch)
treedc555a7401a74790f629aae02bb919834e1faf94 /aarch64/Asmgenproof.v
parent32abc8049ce030f0e338f526f7d16c585d84025f (diff)
downloadcompcert-kvx-373ad4a6efcb6cd0ecd30e7c131640b9783f1269.tar.gz
compcert-kvx-373ad4a6efcb6cd0ecd30e7c131640b9783f1269.zip
Fix the Asmblock/Asm proof
Diffstat (limited to 'aarch64/Asmgenproof.v')
-rw-r--r--aarch64/Asmgenproof.v42
1 files changed, 17 insertions, 25 deletions
diff --git a/aarch64/Asmgenproof.v b/aarch64/Asmgenproof.v
index 32d1261e..19821509 100644
--- a/aarch64/Asmgenproof.v
+++ b/aarch64/Asmgenproof.v
@@ -1924,11 +1924,6 @@ Proof.
* exploit next_inst_incr_pc_preserved; eauto.
* exploit goto_label_preserved; eauto.
- (* Pbtbl *)
- admit.
-(* FIXME, cause commit 0df99dc4 of X. Leroy.
-The modifications of 0df99dc4 on Pbtbl semantics must be also ported to Asmblock.
-*)
-(*
assert (rs2 # X16 <- Vundef r1 = (incrPC (Ptrofs.repr (size bb)) rs1) # X16 <- Vundef r1)
as EQUNDEFX16. {
unfold incrPC, Pregmap.set.
@@ -1941,30 +1936,26 @@ The modifications of 0df99dc4 on Pbtbl semantics must be also ported to Asmblock
rewrite <- (label_pos_preserved f); auto.
inversion MATCHI; subst.
destruct label_pos; next_stuck_cong.
- destruct (((incrPC (Ptrofs.repr (size bb)) rs1) # X16 <- Vundef) # X17 <- Vundef PC) eqn:INCRPC; next_stuck_cong.
+ destruct ((incrPC (Ptrofs.repr (size bb)) rs1) # X16 <- Vundef PC) eqn:INCRPC; next_stuck_cong.
inversion H0; auto. repeat (econstructor; eauto).
rewrite !Pregmap.gso; try congruence.
rewrite <- AGPC.
unfold incrPC in *.
destruct (rs1 PC) eqn:EQRS1; simpl in *; try discriminate.
- replace (((rs2 # X16 <- Vundef) # X17 <- Vundef) # PC <- (Vptr b0 (Ptrofs.repr z))) with
- ((((rs1 # PC <- (Vptr b0 (Ptrofs.add i1 (Ptrofs.repr (size bb))))) # X16 <-
- Vundef) # X17 <- Vundef) # PC <- (Vptr b (Ptrofs.repr z))); auto.
+ replace ((rs2 # X16 <- Vundef) # PC <- (Vptr b0 (Ptrofs.repr z))) with
+ (((rs1 # PC <- (Vptr b0 (Ptrofs.add i1 (Ptrofs.repr (size bb))))) # X16 <-
+ Vundef) # PC <- (Vptr b (Ptrofs.repr z))); auto.
eapply functional_extensionality; intros x.
destruct (PregEq.eq x PC); subst.
+ rewrite Pregmap.gso in INCRPC; try congruence.
- rewrite Pregmap.gso in INCRPC; try congruence.
rewrite Pregmap.gss in INCRPC.
rewrite !Pregmap.gss in *; congruence.
+ rewrite Pregmap.gso; auto.
rewrite (Pregmap.gso (i := x) (j := PC)); auto.
- destruct (PregEq.eq x X17); subst.
+ destruct (PregEq.eq x X16); subst.
* rewrite !Pregmap.gss; auto.
- * rewrite !(Pregmap.gso (i := x) (j:= X17)); auto. destruct (PregEq.eq x X16); subst.
- -- rewrite !Pregmap.gss; auto.
- -- rewrite !Pregmap.gso; auto.
-*)
-Admitted.
+ * rewrite !Pregmap.gso; auto.
+Qed.
Lemma last_instruction_cannot_be_label bb:
list_nth_z (header bb) (size bb - 1) = None.
@@ -2168,11 +2159,6 @@ Proof.
- eapply pc_ptr_exec_step; eauto.
- eapply find_instr_ofs_somei; eauto.
* (* builtin *)
- admit.
-(* FIXME, cause commit 0df99dc4 of X. Leroy.
-The modifications of 0df99dc4 on Pbuiltin semantics must be also ported to Asmblock.
-*)
-(*
destruct s2.
rewrite H in EXIT.
rewrite H in MATCHI. simpl in MATCHI.
@@ -2199,11 +2185,17 @@ The modifications of 0df99dc4 on Pbuiltin semantics must be also ported to Asmbl
reflexivity. }
apply set_builtin_res_dont_move_pc_gen.
-- erewrite !set_builtin_map_not_pc.
- erewrite !undef_regs_other_2.
- rewrite HPC; auto. all: rewrite preg_notin_charact; intros; try discriminate.
+ erewrite !undef_regs_other.
+ rewrite HPC; auto.
+ all: intros; simpl in *; destruct H3 as [HX16 | [HX30 | HDES]]; subst; try discriminate;
+ exploit list_in_map_inv; eauto; intros [mr [A B]]; subst; discriminate.
-- intros. eapply undef_reg_preserved; eauto.
-*)
-Admitted.
+ intros. destruct (PregEq.eq X16 r0); destruct (PregEq.eq X30 r0); subst.
+ rewrite Pregmap.gso, Pregmap.gss; try congruence.
+ do 2 (rewrite Pregmap.gso, Pregmap.gss; try discriminate; auto).
+ rewrite 2Pregmap.gss; auto.
+ rewrite !Pregmap.gso; auto.
+Qed.
Lemma exec_exit_simulation_star b ofs f bb s2 t rs m rs' m': forall
(FINDF: Genv.find_funct_ptr ge b = Some (Internal f))