diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-22 10:16:16 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-22 10:16:16 +0100 |
commit | 4d53251d4e9a07da1170f4be9b04b5d44381c9ed (patch) | |
tree | 6f4ee5c6e54b6c6fcc60311f90bff806d236af97 /riscV/SelectOpproof.v | |
parent | 5281141d38a492eea3e080e087b91a314b0be020 (diff) | |
download | compcert-kvx-4d53251d4e9a07da1170f4be9b04b5d44381c9ed.tar.gz compcert-kvx-4d53251d4e9a07da1170f4be9b04b5d44381c9ed.zip |
Risc-V works again (32/64).
Diffstat (limited to 'riscV/SelectOpproof.v')
-rw-r--r-- | riscV/SelectOpproof.v | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/riscV/SelectOpproof.v b/riscV/SelectOpproof.v index 90f077db..9966305c 100644 --- a/riscV/SelectOpproof.v +++ b/riscV/SelectOpproof.v @@ -29,6 +29,8 @@ Require Import Cminor. Require Import Op. Require Import CminorSel. Require Import SelectOp. +Require Import OpHelpers. +Require Import OpHelpersproof. Local Open Scope cminorsel_scope. @@ -80,8 +82,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. @@ -922,4 +926,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. |