diff options
author | Léo Gourdin <leo.gourdin@lilo.org> | 2021-11-02 16:25:58 +0100 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@lilo.org> | 2021-11-02 16:25:58 +0100 |
commit | 17b1ec4333af8120ab6867baf9c5c9139541c6b7 (patch) | |
tree | 71bd521b6603820c81217ebc10a24fcd940f110a /backend/RTLTunnelingproof.v | |
parent | e9dc339d5e5ec129dcf6b541d6c70f9ca7fe134c (diff) | |
parent | 98ec44d9d96e7e94896eea9ac054a0188be7b6dd (diff) | |
download | compcert-kvx-17b1ec4333af8120ab6867baf9c5c9139541c6b7.tar.gz compcert-kvx-17b1ec4333af8120ab6867baf9c5c9139541c6b7.zip |
Merge branch 'RTL_has_loaded' into kvx-work
Diffstat (limited to 'backend/RTLTunnelingproof.v')
-rw-r--r-- | backend/RTLTunnelingproof.v | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/backend/RTLTunnelingproof.v b/backend/RTLTunnelingproof.v index 0861143b..aa21fc06 100644 --- a/backend/RTLTunnelingproof.v +++ b/backend/RTLTunnelingproof.v @@ -452,43 +452,47 @@ Proof. rewrite <- EVAL. apply eval_operation_preserved. apply symbols_preserved. + apply match_states_intro; eauto. apply set_reg_lessdef. apply LD. apply RS. - (* Iload *) - exploit eval_addressing_lessdef; try eassumption. - apply reglist_lessdef. apply RS. - intros (ta & EVAL & LD). - exploit Mem.loadv_extends; try eassumption. - intros (tv & LOAD & LD'). - left. eexists. split. - + eapply exec_Iload. - * exploit instruction_type_preserved; (simpl; eauto)||congruence. - * rewrite <- EVAL. apply eval_addressing_preserved. apply symbols_preserved. - * apply LOAD. - + apply match_states_intro; try assumption. apply set_reg_lessdef. apply LD'. apply RS. - - (* Iload NOTRAP1 *) - exploit eval_addressing_lessdef_none; try eassumption. - apply reglist_lessdef; apply RS. - left. eexists. split. - + eapply exec_Iload_notrap1. - * exploit instruction_type_preserved; (simpl; eauto)||congruence. - * rewrite <- H1. apply eval_addressing_preserved. apply symbols_preserved. - + apply match_states_intro; try assumption. apply set_reg_lessdef. apply Val.lessdef_undef. apply RS. - - (* Iload NOTRAP2 *) - exploit eval_addressing_lessdef; try eassumption. - apply reglist_lessdef; apply RS. - intros (ta & EVAL & LD). - (* TODO: on peut sans doute factoriser ça *) - destruct (Mem.loadv chunk tm ta) eqn:Htload. - + left; eexists; split. - eapply exec_Iload. - * exploit instruction_type_preserved; (simpl; eauto)||congruence. - * rewrite <- EVAL. apply eval_addressing_preserved. apply symbols_preserved. - * apply Htload. - * apply match_states_intro; try assumption. apply set_reg_lessdef; eauto. - + left; eexists; split. - eapply exec_Iload_notrap2. - * exploit instruction_type_preserved; (simpl; eauto)||congruence. - * rewrite <- EVAL. apply eval_addressing_preserved. apply symbols_preserved. - * apply Htload. - * apply match_states_intro; try assumption. apply set_reg_lessdef; eauto. + inv H0. + + exploit eval_addressing_lessdef; try eassumption. + apply reglist_lessdef. apply RS. + intros (ta & EVAL' & LD). + exploit Mem.loadv_extends; try eassumption. + intros (tv & LOAD' & LD'). + left. eexists. split. + * eapply exec_Iload. + -- exploit instruction_type_preserved; (simpl; eauto)||congruence. + -- try (eapply has_loaded_normal; eauto; rewrite <- EVAL'; apply eval_addressing_preserved; apply symbols_preserved). + * apply match_states_intro; try assumption. apply set_reg_lessdef. apply LD'. apply RS. + + destruct (eval_addressing) eqn:EVAL in LOAD. + * specialize (LOAD v). + exploit eval_addressing_lessdef; try eassumption. + apply reglist_lessdef; apply RS. + intros (ta & ADDR & LD). + (* TODO: on peut sans doute factoriser ça *) + destruct (Mem.loadv chunk tm ta) eqn:Htload. + -- left; eexists; split. + eapply exec_Iload. + ++ exploit instruction_type_preserved; (simpl; eauto)||congruence. + ++ try (eapply has_loaded_normal; eauto; rewrite <- ADDR; apply eval_addressing_preserved; apply symbols_preserved). + ++ apply match_states_intro; try assumption. apply set_reg_lessdef; eauto. + -- left; eexists; split. + eapply exec_Iload. + ++ exploit instruction_type_preserved; (simpl; eauto)||congruence. + ++ eapply has_loaded_default; eauto. + rewrite eval_addressing_preserved with (ge1:=ge). + intros a EVAL'; rewrite ADDR in EVAL'; inv EVAL'. auto. + apply symbols_preserved. + ++ apply match_states_intro; try assumption. apply set_reg_lessdef; eauto. + * exploit eval_addressing_lessdef_none; try eassumption. + apply reglist_lessdef; apply RS. + left. eexists. split. + -- eapply exec_Iload. + ++ exploit instruction_type_preserved; (simpl; eauto)||congruence. + ++ eapply has_loaded_default; eauto. + rewrite eval_addressing_preserved with (ge1:=ge). + intros a EVAL'; rewrite H0 in EVAL'; inv EVAL'. + apply symbols_preserved. + -- apply match_states_intro; try assumption. apply set_reg_lessdef. apply Val.lessdef_undef. apply RS. - (* Lstore *) exploit eval_addressing_lessdef; try eassumption. apply reglist_lessdef; apply RS. |