Section CONSTRUCTORS.
Variable ge: genv.
Variable fn: function.
(** Properties of comparisons. *)
(** Loading a constant. *)
(** Add integer immediate. *)
(** And integer immediate. *)
(** Or integer immediate. *)
(** Xor integer immediate. *)
(** Rotate and mask. *)
(** Load int64 constant. *)
(** Alternate load int64 immediate *)
(** Add int64 immediate. *)
(** Or int64 immediate. *)
(** Xor int64 immediate. *)
(** And int64 immediate. *)
(** Rotate-and-mask for int64 *)
(** Indexed memory loads. *)

Lemma accessind_load_correct:
forall (A: Type) (inj: A -> preg)
(instr1: A -> constant -> ireg -> instruction)
(instr2: A -> ireg -> ireg -> instruction)
(base: ireg) ofs rx chunk v (rs: regset) m k,
(forall rs m r1 cst r2,
exec_instr ge fn (instr1 r1 cst r2) rs m = load1 ge chunk (inj r1) cst r2 rs m) ->
(forall rs m r1 r2 r3,
exec_instr ge fn (instr2 r1 r2 r3) rs m = load2 chunk (inj r1) r2 r3 rs m) ->
Mem.loadv chunk m (Val.offset_ptr rs#base ofs) = Some v ->
base <> GPR0 -> inj rx <> PC ->
exists rs',
exec_straight ge fn (accessind instr1 instr2 base ofs rx k) rs m k rs' m
/\ rs'#(inj rx) = v
/\ forall r, r <> PC -> r <> inj rx -> r <> GPR0 -> rs'#r = rs#r.