aboutsummaryrefslogtreecommitdiffstats
path: root/common/AST.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-12-02 19:49:30 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-12-02 19:49:30 +0100
commitf0c1cc8327ecf2b1e3021bce66f2d6bb0265f6c0 (patch)
tree6d5c6988ad68cfe7052dc6dac267c4de53f0202b /common/AST.v
parentbe3d241a0c2247f48dab2988f49e9c651417328b (diff)
parenteaea751c200213e0f86cf51c1fe93b7ba09c4227 (diff)
downloadcompcert-kvx-f0c1cc8327ecf2b1e3021bce66f2d6bb0265f6c0.tar.gz
compcert-kvx-f0c1cc8327ecf2b1e3021bce66f2d6bb0265f6c0.zip
Merge remote-tracking branch 'origin/mppa-work' into mppa-non-trapping-load
Diffstat (limited to 'common/AST.v')
-rw-r--r--common/AST.v19
1 files changed, 18 insertions, 1 deletions
diff --git a/common/AST.v b/common/AST.v
index bb8508b7..86cab287 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.
@@ -640,11 +640,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