aboutsummaryrefslogtreecommitdiffstats
path: root/backend/RTLTunnelingproof.v
diff options
context:
space:
mode:
Diffstat (limited to 'backend/RTLTunnelingproof.v')
-rw-r--r--backend/RTLTunnelingproof.v78
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.