(** Memory accesses *)

Lemma indexed_load_access_correct:
forall chunk (mk_instr: ireg -> offset -> instruction) rd m,
(forall base ofs rs,
exec_instr ge fn (mk_instr base ofs) rs m = exec_load ge chunk rs m rd base ofs) ->
forall (base: ireg) ofs k (rs: regset) v,
Mem.loadv chunk m (Val.offset_ptr rs#base ofs) = Some v ->
base <> X31 -> rd <> PC ->
exists rs',
exec_straight ge fn (indexed_memory_access mk_instr base ofs k) rs m k rs' m
/\ rs'#rd = v
/\ forall r, r <> PC -> r <> X31 -> r <> rd -> rs'#r = rs#r.