diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-27 20:37:03 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-27 20:37:03 +0100 |
commit | e0843c84d1aa69ed0176cf44109b3bbdd4019504 (patch) | |
tree | 07eb28a3eae67107888412c50aa67e3c82cbb7db /aarch64/Asmgenproof1.v | |
parent | 96482f7df095e6244c414a14b07771dbaef67aec (diff) | |
download | compcert-kvx-e0843c84d1aa69ed0176cf44109b3bbdd4019504.tar.gz compcert-kvx-e0843c84d1aa69ed0176cf44109b3bbdd4019504.zip |
disable leaf function removal of return address restoration due to memcpy overwriting the return address register
Diffstat (limited to 'aarch64/Asmgenproof1.v')
-rw-r--r-- | aarch64/Asmgenproof1.v | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/aarch64/Asmgenproof1.v b/aarch64/Asmgenproof1.v index 2b89723f..0e36bd05 100644 --- a/aarch64/Asmgenproof1.v +++ b/aarch64/Asmgenproof1.v @@ -2070,7 +2070,7 @@ Lemma make_epilogue_correct: forall ge0 f m stk soff cs m' ms rs k tm, (is_leaf_function f = true -> rs # (IR RA) = parent_ra cs) -> load_stack m (Vptr stk soff) Tptr f.(fn_link_ofs) = Some (parent_sp cs) -> - (is_leaf_function f = false -> load_stack m (Vptr stk soff) Tptr f.(fn_retaddr_ofs) = Some (parent_ra cs)) -> + ((* FIXME is_leaf_function f = false -> *) load_stack m (Vptr stk soff) Tptr f.(fn_retaddr_ofs) = Some (parent_ra cs)) -> Mem.free m stk 0 f.(fn_stacksize) = Some m' -> agree ms (Vptr stk soff) rs -> Mem.extends m tm -> @@ -2084,6 +2084,9 @@ Lemma make_epilogue_correct: /\ (forall r, r <> PC -> r <> SP -> r <> RA -> r <> X16 -> rs'#r = rs#r). Proof. intros until tm; intros LEAF_RA LP LRA FREE AG MEXT MCS. + + (* FIXME + Cannot be used at this point destruct (is_leaf_function f) eqn:IS_LEAF. { exploit Mem.loadv_extends. eauto. eexact LP. auto. simpl. intros (parent' & LP' & LDP'). @@ -2106,14 +2109,14 @@ Proof. intros. Simpl. } lapply LRA. 2: reflexivity. - clear LRA. intro LRA. + clear LRA. intro LRA. *) exploit Mem.loadv_extends. eauto. eexact LP. auto. simpl. intros (parent' & LP' & LDP'). exploit Mem.loadv_extends. eauto. eexact LRA. auto. simpl. intros (ra' & LRA' & LDRA'). exploit lessdef_parent_sp; eauto. intros EQ; subst parent'; clear LDP'. exploit lessdef_parent_ra; eauto. intros EQ; subst ra'; clear LDRA'. exploit Mem.free_parallel_extends; eauto. intros (tm' & FREE' & MEXT'). unfold make_epilogue. - rewrite IS_LEAF. + (* FIXME rewrite IS_LEAF. *) exploit (loadptr_correct XSP (fn_retaddr_ofs f)). instantiate (2 := rs). simpl. rewrite <- (sp_val _ _ _ AG). simpl. eexact LRA'. simpl; congruence. intros (rs1 & A1 & B1 & C1). |