(** Preservation of register agreement under various assignments. *)

Lemma agree_set_undef_mreg:
forall ms sp rs r v rl rs',
agree ms sp rs ->
Val.lessdef v (rs'#(preg_of r)) ->
(forall r', data_preg r' = true -> r' <> preg_of r -> preg_notin r' rl -> rs'#r' = rs#r') ->
agree (Regmap.set r v (Mach.undef_regs rl ms)) sp rs'.