(** Global variables mentioned in an operation or addressing mode *)

Definition globals_addressing (addr: addressing) : list ident :=
  match addr with
  | Aglobal s n => s :: nil
  | Abased s n => s :: nil
  | Abasedscaled sc s n => s :: nil
  | _ => nil
  end.Definition globals_operation (op: operation) : list ident :=
  match op with
  | Oindirectsymbol s => s :: nil
  | Olea addr => globals_addressing addr
  | Oleal addr => globals_addressing addr
  | _ => nil
  end.

(* Specifications: *)
Lemma eval_addressing32_preserved: forall sp addr vl, eval_addressing32 ge2 sp addr vl = eval_addressing32 ge1 sp addr vl.
Lemma eval_addressing64_preserved: forall sp addr vl, eval_addressing64 ge2 sp addr vl = eval_addressing64 ge1 sp addr vl.
Lemma eval_addressing_preserved: forall sp addr vl, eval_addressing ge2 sp addr vl = eval_addressing ge1 sp addr vl.
Lemma eval_operation_preserved: forall sp op vl m, eval_operation ge2 sp op vl m = eval_operation ge1 sp op vl m.