From 173e6c25b2937d6e6941973aa7b116e1d6405513 Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Tue, 2 Nov 2021 10:10:34 +0100 Subject: Porting the BTL non-trap loads approach to RTL --- scheduling/BTL.v | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'scheduling/BTL.v') diff --git a/scheduling/BTL.v b/scheduling/BTL.v index f832085c..c10b8ac2 100644 --- a/scheduling/BTL.v +++ b/scheduling/BTL.v @@ -205,22 +205,8 @@ Definition find_function (ros: reg + ident) (rs: regset) : option fundef := Local Open Scope option_monad_scope. -(* TODO: a new (hopefully simpler) scheme to support "NOTRAP" wrt current scheme of RTL *) - -Inductive has_loaded sp rs m chunk addr args v: trapping_mode -> Prop := - | has_loaded_normal a trap - (EVAL: eval_addressing ge sp addr rs##args = Some a) - (LOAD: Mem.loadv chunk m a = Some v) - : has_loaded sp rs m chunk addr args v trap - | has_loaded_default - (LOAD: forall a, eval_addressing ge sp addr rs##args = Some a -> Mem.loadv chunk m a = None) - (DEFAULT: v = Vundef) - : has_loaded sp rs m chunk addr args v NOTRAP - . Local Hint Constructors has_loaded: core. -(* TODO: move this scheme in "Memory" module if this scheme is useful ! *) - (** internal big-step execution of one iblock *) Inductive iblock_istep sp: regset -> mem -> iblock -> regset -> mem -> option final -> Prop := | exec_final rs m fin iinfo: iblock_istep sp rs m (BF fin iinfo) rs m (Some fin) @@ -229,7 +215,7 @@ Inductive iblock_istep sp: regset -> mem -> iblock -> regset -> mem -> option fi (EVAL: eval_operation ge sp op rs##args m = Some v) : iblock_istep sp rs m (Bop op args res iinfo) (rs#res <- v) m None | exec_load rs m trap chunk addr args dst v iinfo - (LOAD: has_loaded sp rs m chunk addr args v trap) + (LOAD: has_loaded ge sp rs m chunk addr args v trap) : iblock_istep sp rs m (Bload trap chunk addr args dst iinfo) (rs#dst <- v) m None | exec_store rs m chunk addr args src a m' iinfo (EVAL: eval_addressing ge sp addr rs##args = Some a) @@ -296,7 +282,7 @@ Fixpoint iblock_istep_run sp ib rs m: option outcome := Lemma iblock_istep_run_equiv_load sp ib v rs rs' m trap chunk addr args dst iinfo ofin: ib = (Bload trap chunk addr args dst iinfo) -> rs' = rs # dst <- v -> - has_loaded sp rs m chunk addr args v trap -> + has_loaded ge sp rs m chunk addr args v trap -> iblock_istep sp rs m ib rs' m ofin <-> iblock_istep_run sp ib rs m = Some {| _rs := rs'; _m := m; _fin := ofin |}. Proof. -- cgit