diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-09-23 19:48:20 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-09-23 19:48:20 +0200 |
commit | c7156a4fd9c449c7610942a2fbf1e0908459b7f6 (patch) | |
tree | 50460a87be5baffd5aa8e32c71d4be3ccb980c8d /arm | |
parent | a8e2039a772da0fcfd484b7445de8cc093be5d2b (diff) | |
download | compcert-kvx-c7156a4fd9c449c7610942a2fbf1e0908459b7f6.tar.gz compcert-kvx-c7156a4fd9c449c7610942a2fbf1e0908459b7f6.zip |
add: non trapping ops
Diffstat (limited to 'arm')
-rw-r--r-- | arm/Op.v | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -518,6 +518,32 @@ Proof with (try exact I; try reflexivity). unfold Val.select. destruct (eval_condition c vl m). apply Val.normalize_type. exact I. Qed. + +Definition is_trapping_op (op : operation) := + match op with + | Odiv | Odivu + | Oshrximm _ + | Ointoffloat | Ointuoffloat + | Ointofsingle | Ointuofsingle + | Ofloatofint | Ofloatofintu + | Osingleofint | Osingleofintu => true + | _ => false + end. + + +Lemma is_trapping_op_sound: + forall op vl sp m, + op <> Omove -> + is_trapping_op op = false -> + (List.length vl) = (List.length (fst (type_of_operation op))) -> + eval_operation genv sp op vl m <> None. +Proof. + destruct op; intros; simpl in *; try congruence. + all: try (destruct vl as [ | vh1 vl1]; try discriminate). + all: try (destruct vl1 as [ | vh2 vl2]; try discriminate). + all: try (destruct vl2 as [ | vh3 vl3]; try discriminate). + all: try (destruct vl3 as [ | vh4 vl4]; try discriminate). +Qed. End SOUNDNESS. (** * Manipulating and transforming operations *) |