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.
Remark make_ptrofs_of_int_correct:
forall e le m a i si,
eval_expr ge e le m a (Vint i) ->
eval_expr ge e le m (if Archi.ptr64 then make_longofint a si else a) (Vptrofs (ptrofs_of_int si i)).
Remark make_ptrofs_of_int64_correct:
forall e le m a i,
eval_expr ge e le m a (Vlong i) ->
eval_expr ge e le m (if Archi.ptr64 then a else Eunop Ointoflong a) (Vptrofs (Ptrofs.of_int64 i)).

Lemma make_normalization_correct:
forall e le m a v t,
eval_expr ge e le m a v ->
wt_val v t ->
eval_expr ge e le m (make_normalization t a) v.