From 7717d9e5f781a0b0d79f72c5439cf822f4ea78d0 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 1 May 2013 09:22:49 +0000 Subject: Coq-defined equality functions for Allocation. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2225 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- ia32/Op.v | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'ia32') diff --git a/ia32/Op.v b/ia32/Op.v index 3dc1f77..998f34d 100644 --- a/ia32/Op.v +++ b/ia32/Op.v @@ -122,7 +122,14 @@ Definition Oaddrsymbol (id: ident) (ofs: int) : operation := Olea (Aglobal id of Definition Oaddrstack (ofs: int) : operation := Olea (Ainstack ofs). Definition Oaddimm (n: int) : operation := Olea (Aindexed n). -(** Comparison functions (used in module [CSE]). *) +(** Comparison functions (used in modules [CSE] and [Allocation]). *) + +Definition eq_condition (x y: condition) : {x=y} + {x<>y}. +Proof. + generalize Int.eq_dec; intro. + assert (forall (x y: comparison), {x=y}+{x<>y}). decide equality. + decide equality. +Defined. Definition eq_addressing (x y: addressing) : {x=y} + {x<>y}. Proof. @@ -136,14 +143,13 @@ Proof. generalize Int.eq_dec; intro. generalize Float.eq_dec; intro. generalize Int64.eq_dec; intro. - assert (forall (x y: ident), {x=y}+{x<>y}). exact peq. - assert (forall (x y: comparison), {x=y}+{x<>y}). decide equality. - assert (forall (x y: condition), {x=y}+{x<>y}). decide equality. decide equality. + apply peq. apply eq_addressing. + apply eq_condition. Defined. -Global Opaque eq_addressing eq_operation. +Global Opaque eq_condition eq_addressing eq_operation. (** * Evaluation functions *) -- cgit v1.2.3