(** Translation of function epilogues *)

(* Specifications: *)
Lemma transl_epilogue_correct:
forall ge0 f m stk soff cs m' ms rs k tm,
load_stack m (Vptr stk soff) Tptr f.(fn_link_ofs) = Some (parent_sp cs) ->
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 ->
(is_leaf_function f = true -> rs#LR = parent_ra cs) ->
Mem.extends m tm ->
match_stack ge0 cs ->
exists rs', exists tm',
exec_straight ge fn (transl_epilogue f k) rs tm k rs' tm'
/\ agree ms (parent_sp cs) rs'
/\ Mem.extends m' tm'
/\ rs'#LR = parent_ra cs
/\ rs'#SP = parent_sp cs
/\ (forall r, r <> PC -> r <> LR -> r <> SP -> r <> GPR0 -> rs'#r = rs#r).