(** Translation of memory accesses *)

Lemma transl_memory_access_correct:
forall (P: regset -> Prop) mk1 mk2 addr args temp k c (rs: regset) a m m',
transl_memory_access mk1 mk2 addr args temp k = OK c ->
eval_addressing ge (rs#GPR1) addr (map rs (map preg_of args)) = Some a ->
temp <> GPR0 ->
(forall cst (r1: ireg) (rs1: regset) k,
Val.lessdef a (Val.add (gpr_or_zero rs1 r1) (const_low ge cst)) ->
(forall r, r <> PC -> r <> temp -> r <> GPR0 -> rs1 r = rs r) ->
exists rs',
exec_straight ge fn (mk1 cst r1 :: k) rs1 m k rs' m' /\ P rs') ->
(forall (r1 r2: ireg) (rs1: regset) k,
Val.lessdef a (Val.add (gpr_or_zero rs1 r1) rs1#r2) ->
(forall r, r <> PC -> r <> temp -> r <> GPR0 -> rs1 r = rs r) ->
exists rs',
exec_straight ge fn (mk2 r1 r2 :: k) rs1 m k rs' m' /\ P rs') ->
exists rs',
exec_straight ge fn c rs m k rs' m' /\ P rs'.