Section CONSTRUCTORS.
Variable ge: genv.
Variable fn: function.
(** Decomposition of integer literals *)
Inductive wf_decomposition: list (Z * Z) -> Prop :=
| wf_decomp_nil:
wf_decomposition nil
| wf_decomp_cons: forall m n p l,
n = Zzero_ext 16 m -> 0 <= p -> wf_decomposition l ->
wf_decomposition ((n, p) :: l).
Fixpoint recompose_int (accu: Z) (l: list (Z * Z)) : Z :=
match l with
| nil => accu
| (n, p) :: l => recompose_int (Zinsert accu n p 16) l
end.
(** Add immediate *)

Lemma exec_addimm_aux_32:
forall (insn: iregsp -> iregsp -> Z -> instruction) (sem: val -> val -> val),
(forall rd r1 n rs m,
exec_instr ge fn (insn rd r1 n) rs m =
Next (nextinstr (rs#rd <- (sem rs#r1 (Vint (Int.repr n))))) m) ->
(forall v n1 n2, sem (sem v (Vint n1)) (Vint n2) = sem v (Vint (Int.add n1 n2))) ->
forall rd r1 n k rs m,
exists rs',
exec_straight ge fn (addimm_aux insn rd r1 (Int.unsigned n) k) rs m k rs' m
/\ rs'#rd = sem rs#r1 (Vint n)
/\ forall r, data_preg r = true -> r <> rd -> rs'#r = rs#r.