(* *********************************************************************)
(*                                                                     *)
(*              The Compcert verified compiler                         *)
(*                                                                     *)
(*          Xavier Leroy, INRIA Paris-Rocquencourt                     *)
(*                                                                     *)
(*  Copyright Institut National de Recherche en Informatique et en     *)
(*  Automatique.  All rights reserved.  This file is distributed       *)
(*  under the terms of the INRIA Non-Commercial License Agreement.     *)
(*                                                                     *)
(* *********************************************************************)
(** ** Machine registers *)
(** The following type defines the machine registers that can be referenced as locations.  These include: - Integer registers that can be allocated to RTL pseudo-registers. - Floating-point registers that can be allocated to RTL pseudo-registers. - The special [FP0] register denoting the top of the X87 float stack.  The type [mreg] does not include special-purpose or reserved machine registers such as the stack pointer and the condition codes. *)
Inductive mreg: Type :=
(** Allocatable integer regs *)
| AX | BX | CX | DX | SI | DI | BP
| R8 | R9 | R10 | R11 | R12 | R13 | R14 | R15  (**r only in 64-bit mode *)
(** Allocatable float regs *)
| X0 | X1 | X2 | X3 | X4 | X5 | X6 | X7
| X8 | X9 | X10 | X11 | X12 | X13 | X14 | X15  (**r only in 64-bit mode *)
(** Special float reg *)
| FP0.

Lemma mreg_eq: forall (r1 r2: mreg), {r1 = r2} + {r1 <> r2}.