Fixpoint setres (res: builtin_res mreg) (v: val) (m: t) : t :=
match res with
| BR r => set (R r) v m
| BR_none => m
| BR_splitlong hi lo =>
setres lo (Val.loword v) (setres hi (Val.hiword v) m)
end.
End Locmap.
(** * Total ordering over locations *)
Module IndexedTyp <: INDEXED_TYPE.
Definition t := typ.
Definition index (x: t) :=
match x with
| Tany32 => 1%positive
| Tint => 2%positive
| Tsingle => 3%positive
| Tany64 => 4%positive
| Tfloat => 5%positive
| Tlong => 6%positive
end.

(* Specifications: *)
Lemma index_inj: forall x y, index x = index y -> x = y.
Lemma lt_not_eq : forall x y : t, lt x y -> ~ eq x y.
Definition compare : forall x y : t, Compare lt eq x y.
Lemma diff_outside_interval:
forall l l', Loc.diff l l' -> lt l' (diff_low_bound l) \/ lt (diff_high_bound l) l'.