aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@univ-grenoble-alpes.fr>2019-10-04 17:57:25 +0200
committerCyril SIX <cyril.six@univ-grenoble-alpes.fr>2019-10-04 17:57:25 +0200
commit7b4e6a522bcf1f247ef9b3517af328b5da670a98 (patch)
tree5445e4aa567b8dc281a52d94f5cfbe6de130d2b8 /common
parent655c6a861b426db3e5da942faaef7f5caed224e3 (diff)
downloadcompcert-kvx-7b4e6a522bcf1f247ef9b3517af328b5da670a98.tar.gz
compcert-kvx-7b4e6a522bcf1f247ef9b3517af328b5da670a98.zip
Ibuiltin proof
Diffstat (limited to 'common')
-rw-r--r--common/AST.v19
1 files changed, 18 insertions, 1 deletions
diff --git a/common/AST.v b/common/AST.v
index a91138c9..7ffe355d 100644
--- a/common/AST.v
+++ b/common/AST.v
@@ -17,7 +17,7 @@
the abstract syntax trees of many of the intermediate languages. *)
Require Import String.
-Require Import Coqlib Maps Errors Integers Floats.
+Require Import Coqlib Maps Errors Integers Floats BinPos.
Require Archi.
Set Implicit Arguments.
@@ -630,11 +630,28 @@ Inductive builtin_arg (A: Type) : Type :=
| BA_splitlong (hi lo: builtin_arg A)
| BA_addptr (a1 a2: builtin_arg A).
+Definition builtin_arg_eq {A: Type}:
+ (forall x y : A, {x = y} + {x <> y}) ->
+ forall (ba1 ba2: (builtin_arg A)), {ba1=ba2} + {ba1<>ba2}.
+Proof.
+ intro. generalize Integers.int_eq int64_eq float_eq float32_eq chunk_eq ptrofs_eq ident_eq.
+ decide equality.
+Defined.
+Global Opaque builtin_arg_eq.
+
Inductive builtin_res (A: Type) : Type :=
| BR (x: A)
| BR_none
| BR_splitlong (hi lo: builtin_res A).
+Definition builtin_res_eq {A: Type}:
+ (forall x y : A, {x = y} + {x <> y}) ->
+ forall (a b: builtin_res A), {a=b} + {a<>b}.
+Proof.
+ intro. decide equality.
+Defined.
+Global Opaque builtin_res_eq.
+
Fixpoint globals_of_builtin_arg (A: Type) (a: builtin_arg A) : list ident :=
match a with
| BA_loadglobal chunk id ofs => id :: nil