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.

Lemma index_inj: forall x y, index x = index y -> x = y.