diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-24 12:04:33 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-04-24 12:04:33 +0200 |
commit | aa3ac1afb0b05a2d80f697c2179b59f8c73c83fb (patch) | |
tree | a862a409145b41dcc63fcc318b096fe0576a03a4 | |
parent | 4dd6603a4500e4de1315f2f1015dc615911d4c3d (diff) | |
download | compcert-kvx-aa3ac1afb0b05a2d80f697c2179b59f8c73c83fb.tar.gz compcert-kvx-aa3ac1afb0b05a2d80f697c2179b59f8c73c83fb.zip |
make_prologue à part
-rw-r--r-- | mppa_k1c/Asmblockgen.v | 9 | ||||
-rw-r--r-- | mppa_k1c/Asmblockgenproof.v | 6 |
2 files changed, 9 insertions, 6 deletions
diff --git a/mppa_k1c/Asmblockgen.v b/mppa_k1c/Asmblockgen.v index bf466c4e..b00e4e89 100644 --- a/mppa_k1c/Asmblockgen.v +++ b/mppa_k1c/Asmblockgen.v @@ -1060,12 +1060,15 @@ Fixpoint transl_blocks (f: Machblock.function) (lmb: list Machblock.bblock) (ep: end . +Definition make_prologue (f: Machblock.function) lb := + (Pallocframe f.(fn_stacksize) f.(fn_link_ofs) ::b + Pget GPRA RA ::b + storeind_ptr GPRA SP f.(fn_retaddr_ofs) ::b lb). + Definition transl_function (f: Machblock.function) := do lb <- transl_blocks f f.(Machblock.fn_code) true; OK (mkfunction f.(Machblock.fn_sig) - (Pallocframe f.(fn_stacksize) f.(fn_link_ofs) ::b - Pget GPRA RA ::b - storeind_ptr GPRA SP f.(fn_retaddr_ofs) ::b lb)). + (make_prologue f lb)). Definition transf_function (f: Machblock.function) : res Asmvliw.function := do tf <- transl_function f; diff --git a/mppa_k1c/Asmblockgenproof.v b/mppa_k1c/Asmblockgenproof.v index e3be258a..c6c88681 100644 --- a/mppa_k1c/Asmblockgenproof.v +++ b/mppa_k1c/Asmblockgenproof.v @@ -234,7 +234,7 @@ Lemma transl_find_label: end.
Proof.
intros. monadInv H. destruct (zlt Ptrofs.max_unsigned (size_blocks (fn_blocks x))); inv EQ0. clear g.
- monadInv EQ. simpl fn_blocks. repeat (rewrite find_label_nil); simpl; auto.
+ monadInv EQ. unfold make_prologue. simpl fn_blocks. repeat (rewrite find_label_nil); simpl; auto.
eapply transl_blocks_label; eauto.
Qed.
@@ -1686,11 +1686,11 @@ Proof. - eexact W'.
- eexact W. }
exploit exec_straight_steps_2; eauto using functions_transl.
- simpl fn_blocks. simpl fn_blocks in g. unfold tfbody. simpl bblock_single_inst. omega. constructor.
+ simpl fn_blocks. unfold make_prologue in g. simpl fn_blocks in g. unfold tfbody. simpl bblock_single_inst. omega. constructor.
intros (ofs' & X & Y).
left; exists (State rs3' m3'); split.
eapply exec_straight_steps_1; eauto.
- simpl fn_blocks. simpl fn_blocks in g. unfold tfbody. simpl bblock_single_inst. omega.
+ simpl fn_blocks. unfold make_prologue in g. simpl fn_blocks in g. unfold tfbody. simpl bblock_single_inst. omega.
constructor.
econstructor; eauto.
rewrite X; econstructor; eauto.
|