aboutsummaryrefslogtreecommitdiffstats
path: root/backend/SplitLongproof.v
diff options
context:
space:
mode:
Diffstat (limited to 'backend/SplitLongproof.v')
-rw-r--r--backend/SplitLongproof.v25
1 files changed, 4 insertions, 21 deletions
diff --git a/backend/SplitLongproof.v b/backend/SplitLongproof.v
index 1e50b1c2..e45c3a34 100644
--- a/backend/SplitLongproof.v
+++ b/backend/SplitLongproof.v
@@ -16,6 +16,8 @@ Require Import String.
Require Import Coqlib Maps.
Require Import AST Errors Integers Floats.
Require Import Values Memory Globalenvs Builtins Events Cminor Op CminorSel.
+Require Import OpHelpers OpHelpersproof.
+Require Import Values Memory Globalenvs Builtins Events Cminor Op CminorSel.
Require Import SelectOp SelectOpproof SplitLong.
Local Open Scope cminorsel_scope.
@@ -23,26 +25,6 @@ Local Open Scope string_scope.
(** * Properties of the helper functions *)
-Definition helper_declared {F V: Type} (p: AST.program (AST.fundef F) V) (id: ident) (name: string) (sg: signature) : Prop :=
- (prog_defmap p)!id = Some (Gfun (External (EF_runtime name sg))).
-
-Definition helper_functions_declared {F V: Type} (p: AST.program (AST.fundef F) V) (hf: helper_functions) : Prop :=
- helper_declared p i64_dtos "__compcert_i64_dtos" sig_f_l
- /\ helper_declared p i64_dtou "__compcert_i64_dtou" sig_f_l
- /\ helper_declared p i64_stod "__compcert_i64_stod" sig_l_f
- /\ helper_declared p i64_utod "__compcert_i64_utod" sig_l_f
- /\ helper_declared p i64_stof "__compcert_i64_stof" sig_l_s
- /\ helper_declared p i64_utof "__compcert_i64_utof" sig_l_s
- /\ helper_declared p i64_sdiv "__compcert_i64_sdiv" sig_ll_l
- /\ helper_declared p i64_udiv "__compcert_i64_udiv" sig_ll_l
- /\ helper_declared p i64_smod "__compcert_i64_smod" sig_ll_l
- /\ helper_declared p i64_umod "__compcert_i64_umod" sig_ll_l
- /\ helper_declared p i64_shl "__compcert_i64_shl" sig_li_l
- /\ helper_declared p i64_shr "__compcert_i64_shr" sig_li_l
- /\ helper_declared p i64_sar "__compcert_i64_sar" sig_li_l
- /\ helper_declared p i64_umulh "__compcert_i64_umulh" sig_ll_l
- /\ helper_declared p i64_smulh "__compcert_i64_smulh" sig_ll_l.
-
(** * Correctness of the instruction selection functions for 64-bit operators *)
Section CMCONSTR.
@@ -55,6 +37,7 @@ Variable sp: val.
Variable e: env.
Variable m: mem.
+Ltac UseHelper := decompose [Logic.and] arith_helpers_correct; eauto.
Ltac DeclHelper := red in HELPERS; decompose [Logic.and] HELPERS; eauto.
Lemma eval_helper:
@@ -342,7 +325,7 @@ Theorem eval_longofint: unary_constructor_sound longofint Val.longofint.
Proof.
red; intros. unfold longofint. destruct (longofint_match a).
- InvEval. econstructor; split. apply eval_longconst. auto.
-- exploit (eval_shrimm ge sp e m (Int.repr 31) (x :: le) (Eletvar 0)). EvalOp.
+- exploit (eval_shrimm prog sp e m (Int.repr 31) (x :: le) (Eletvar 0)). EvalOp.
intros [v1 [A B]].
econstructor; split. EvalOp.
destruct x; simpl; auto.