diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2020-12-20 14:33:44 +0100 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2020-12-20 14:33:44 +0100 |
commit | a23b977c5e100c1fd24d47d99b7e860c0bcf64ae (patch) | |
tree | dc555a7401a74790f629aae02bb919834e1faf94 /aarch64/Asmgenproof.v | |
parent | a71ed69400fbd8f6533a32c117e7063f6b083049 (diff) | |
parent | 373ad4a6efcb6cd0ecd30e7c131640b9783f1269 (diff) | |
download | compcert-kvx-a23b977c5e100c1fd24d47d99b7e860c0bcf64ae.tar.gz compcert-kvx-a23b977c5e100c1fd24d47d99b7e860c0bcf64ae.zip |
Merge branch 'aarch64-peephole-tofix' into aarch64-peephole
Diffstat (limited to 'aarch64/Asmgenproof.v')
-rw-r--r-- | aarch64/Asmgenproof.v | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/aarch64/Asmgenproof.v b/aarch64/Asmgenproof.v index a91ec285..19821509 100644 --- a/aarch64/Asmgenproof.v +++ b/aarch64/Asmgenproof.v @@ -1936,28 +1936,25 @@ Proof. 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. + * rewrite !Pregmap.gso; auto. Qed. Lemma last_instruction_cannot_be_label bb: @@ -2188,9 +2185,16 @@ Proof. 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. + 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 |