diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-09-03 23:02:06 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-09-03 23:02:06 +0200 |
commit | 1d90fa730df7d1cb2ee726d3b41b9915ae4e4e2e (patch) | |
tree | c6f814f178b11a93f2a4113ddaad536dcdf4d657 | |
parent | 2fe044ba1dbaa3fce00a221d988e06c6907cfaf2 (diff) | |
download | compcert-kvx-1d90fa730df7d1cb2ee726d3b41b9915ae4e4e2e.tar.gz compcert-kvx-1d90fa730df7d1cb2ee726d3b41b9915ae4e4e2e.zip |
moved trapping_mode to a more appropriate place
-rw-r--r-- | backend/RTL.v | 2 | ||||
-rw-r--r-- | common/AST.v | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/backend/RTL.v b/backend/RTL.v index d09cca77..95fa1f82 100644 --- a/backend/RTL.v +++ b/backend/RTL.v @@ -36,8 +36,6 @@ Require Import Op Registers. Definition node := positive. -Inductive trapping_mode : Type := TRAP | NOTRAP. - Inductive instruction: Type := | Inop: node -> instruction (** No operation -- just branch to the successor. *) diff --git a/common/AST.v b/common/AST.v index a91138c9..d98f954a 100644 --- a/common/AST.v +++ b/common/AST.v @@ -193,6 +193,15 @@ Definition chunk_of_type (ty: typ) := Lemma chunk_of_Tptr: chunk_of_type Tptr = Mptr. Proof. unfold Mptr, Tptr; destruct Archi.ptr64; auto. Qed. +(** Trapping mode: does undefined behavior result in a trap or an undefined value (e.g. for loads) *) +Inductive trapping_mode : Type := TRAP | NOTRAP. + +Definition trapping_mode_eq : forall x y : trapping_mode, + { x=y } + { x <> y}. +Proof. + decide equality. +Defined. + (** Initialization data for global variables. *) Inductive init_data: Type := |