Section MAKE_BIN.
Variable sem_int: signedness -> int -> int -> option val.
Variable sem_long: signedness -> int64 -> int64 -> option val.
Variable sem_float: float -> float -> option val.
Variable sem_single: float32 -> float32 -> option val.
Variables iop iopu fop sop lop lopu: binary_operation.
Hypothesis iop_ok:
forall x y m, eval_binop iop (Vint x) (Vint y) m = sem_int Signed x y.
Hypothesis iopu_ok:
forall x y m, eval_binop iopu (Vint x) (Vint y) m = sem_int Unsigned x y.
Hypothesis lop_ok:
forall x y m, eval_binop lop (Vlong x) (Vlong y) m = sem_long Signed x y.
Hypothesis lopu_ok:
forall x y m, eval_binop lopu (Vlong x) (Vlong y) m = sem_long Unsigned x y.
Hypothesis fop_ok:
forall x y m, eval_binop fop (Vfloat x) (Vfloat y) m = sem_float x y.
Hypothesis sop_ok:
forall x y m, eval_binop sop (Vsingle x) (Vsingle y) m = sem_single x y.
End MAKE_BIN.
Hint Extern 2 (@eq (option val) _ _) => (simpl; reflexivity) : cshm.
Ltac comput val :=
let x := fresh in set val as x in *; vm_compute in x; subst x.
Remark small_shift_amount_1:
forall i,
Int64.ltu i Int64.iwordsize = true ->
Int.ltu (Int64.loword i) Int64.iwordsize' = true
/\ Int64.unsigned i = Int.unsigned (Int64.loword i).
Remark small_shift_amount_2:
forall i,
Int64.ltu i (Int64.repr 32) = true ->
Int.ltu (Int64.loword i) Int.iwordsize = true.

Lemma make_cmp_ptr_correct:
forall cmp e le m a va b vb v,
cmp_ptr m cmp va vb = Some v ->
eval_expr ge e le m a va ->
eval_expr ge e le m b vb ->
eval_expr ge e le m (make_cmp_ptr cmp a b) v.