aboutsummaryrefslogtreecommitdiffstats
path: root/arm/SelectOpproof.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-22 09:51:56 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-03-22 09:51:56 +0100
commit5281141d38a492eea3e080e087b91a314b0be020 (patch)
treec27e1da95d37abc1a14839c0bfb26fd2dd102077 /arm/SelectOpproof.v
parent1fd8a013a4fa57fcfa6c9e295638871153e596ee (diff)
downloadcompcert-kvx-5281141d38a492eea3e080e087b91a314b0be020.tar.gz
compcert-kvx-5281141d38a492eea3e080e087b91a314b0be020.zip
ARM repasse
Diffstat (limited to 'arm/SelectOpproof.v')
-rw-r--r--arm/SelectOpproof.v28
1 files changed, 26 insertions, 2 deletions
diff --git a/arm/SelectOpproof.v b/arm/SelectOpproof.v
index d4aac9b6..212bcfd7 100644
--- a/arm/SelectOpproof.v
+++ b/arm/SelectOpproof.v
@@ -24,6 +24,7 @@ Require Import Cminor.
Require Import Op.
Require Import CminorSel.
Require Import SelectOp.
+Require Import OpHelpers OpHelpersproof.
Local Open Scope cminorsel_scope.
Local Transparent Archi.ptr64.
@@ -76,8 +77,10 @@ Ltac TrivialExists :=
(** * Correctness of the smart constructors *)
Section CMCONSTR.
-
-Variable ge: genv.
+Variable prog: program.
+Variable hf: helper_functions.
+Hypothesis HELPERS: helper_functions_declared prog hf.
+Let ge := Genv.globalenv prog.
Variable sp: val.
Variable e: env.
Variable m: mem.
@@ -893,4 +896,25 @@ Proof.
- constructor; auto.
Qed.
+
+(* floating-point division without HELPERS *)
+Theorem eval_divf_base:
+ forall le a b x y,
+ eval_expr ge sp e m le a x ->
+ eval_expr ge sp e m le b y ->
+ exists v, eval_expr ge sp e m le (divf_base a b) v /\ Val.lessdef (Val.divf x y) v.
+Proof.
+ intros; unfold divf_base.
+ TrivialExists.
+Qed.
+
+Theorem eval_divfs_base:
+ forall le a b x y,
+ eval_expr ge sp e m le a x ->
+ eval_expr ge sp e m le b y ->
+ exists v, eval_expr ge sp e m le (divfs_base a b) v /\ Val.lessdef (Val.divfs x y) v.
+Proof.
+ intros; unfold divfs_base.
+ TrivialExists.
+Qed.
End CMCONSTR.