(** ** Locations *)
(** Locations are just the disjoint union of machine registers and activation record slots. *)
Inductive loc : Type :=
| R (r: mreg)
| S (sl: slot) (pos: Z) (ty: typ).
Module Loc.
Definition type (l: loc) : typ :=
match l with
| R r => mreg_type r
| S sl pos ty => ty
end.

Lemma diff_not_eq:
forall l1 l2, diff l1 l2 -> l1 <> l2.