From compcert Require Export Clightdefs.
Require Export VST.veric.base.
Require Export VST.veric.SeparationLogic.
Require Export VST.msl.Extensionality.
Require Export compcert.lib.Coqlib.
Require Export VST.msl.Coqlib2 VST.veric.coqlib4 VST.floyd.coqlib3.
Require Export VST.floyd.functional_base.
Hint Rewrite @sem_add_pi_ptr using (solve [auto with norm]) : norm.
Hint Rewrite sem_cast_i2i_correct_range using (solve [auto with norm]) : norm.
Hint Rewrite sem_cast_neutral_Vint : norm.
Definition isVint v := match v with Vint _ => True | _ => False end.
Hint Resolve is_int_I32_Vint : core.
Hint Rewrite sem_cast_neutral_int using
(auto;
match goal with H: is_int ?i ?s ?v |- isVint ?v => apply (is_int_is_Vint i s v H) end) : norm.
Hint Rewrite @eval_expr_Etempvar : eval.
Hint Resolve  @eval_expr_Etempvar' : core.
Hint Rewrite Int.add_zero  Int.add_zero_l Int.sub_zero_l : norm.
Hint Rewrite Ptrofs.add_zero  Ptrofs.add_zero_l Ptrofs.sub_zero_l : norm.
Hint Rewrite deref_noload_tarray : norm.
Hint Rewrite deref_noload_Tarray : norm.
Hint Rewrite flip_lifted_eq : norm.
Hint Resolve isptr_is_pointer_or_null : core.
Definition add_ptr_int  {cs: compspecs}  (ty: type) (v: val) (i: Z) : val :=
eval_binop Cop.Oadd (tptr ty) tint v (Vint (Int.repr i)).
Abort. (* broken in CompCert 2.7 *)
Definition Zcmp (op: comparison) : Z -> Z -> Prop :=
match op with
| Ceq => eq
| Cne => (fun i j => i<>j)
| Clt => Z.lt
| Cle => Z.le
| Cgt => Z.gt
| Cge => Z.ge
end.

Lemma typed_false_cmp_repr:
forall op i j,
repable_signed i -> repable_signed j ->
typed_false tint (force_val (sem_cmp op tint tint
(Vint (Int.repr i))
(Vint (Int.repr j)) )) ->
Zcmp (negate_comparison op) i j.