Section CONSTRUCTORS.
Variable ge: genv.
Variable fn: function.
(** 32-bit integer constants and arithmetic *)
(** 64-bit integer constants and arithmetic *)
(** Add offset to pointer *)
(** Translation of conditional branches *)
Remark branch_on_X31:
forall normal lbl (rs: regset) m b,
rs#X31 = Val.of_bool (eqb normal b) ->
exec_instr ge fn (if normal then Pbnew X31 X0 lbl else Pbeqw X31 X0 lbl) rs m =
eval_branch fn lbl rs m (Some b).
Ltac ArgsInv :=
repeat (match goal with
| [ H: Error _ = OK _ |- _ ] => discriminate
| [ H: match ?args with nil => _ | _ :: _ => _ end = OK _ |- _ ] => destruct args
| [ H: bind _ _ = OK _ |- _ ] => monadInv H
| [ H: match _ with left _ => _ | right _ => assertion_failed end = OK _ |- _ ] => monadInv H; ArgsInv
| [ H: match _ with true => _ | false => assertion_failed end = OK _ |- _ ] => monadInv H; ArgsInv
end);
subst;
repeat (match goal with
| [ H: ireg_of _ = OK _ |- _ ] => simpl in *; rewrite (ireg_of_eq _ _ H) in *
| [ H: freg_of _ = OK _ |- _ ] => simpl in *; rewrite (freg_of_eq _ _ H) in *
end).

Lemma transl_cbranch_correct_false:
forall cond args lbl k c m ms sp rs m',
transl_cbranch cond args lbl k = OK c ->
eval_condition cond (List.map ms args) m = Some false ->
agree ms sp rs ->
Mem.extends m m' ->
exists rs',
exec_straight ge fn c rs m' k rs' m'
/\ forall r, r <> PC -> r <> X31 -> rs'#r = rs#r.