aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/Asmblock.v
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-07-30 16:46:16 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-07-30 16:46:16 +0200
commitce33586e40bf7be637b932d363275b9d5761a3a0 (patch)
tree943b85a5e32a01c0a38dac004d3f0e4e977030e7 /mppa_k1c/Asmblock.v
parent5b4560bd853cbcf1ef195da1b625f37609ec00ec (diff)
downloadcompcert-kvx-ce33586e40bf7be637b932d363275b9d5761a3a0.tar.gz
compcert-kvx-ce33586e40bf7be637b932d363275b9d5761a3a0.zip
(#156) - Un peu de cleaning et de doc
Diffstat (limited to 'mppa_k1c/Asmblock.v')
-rw-r--r--mppa_k1c/Asmblock.v33
1 files changed, 1 insertions, 32 deletions
diff --git a/mppa_k1c/Asmblock.v b/mppa_k1c/Asmblock.v
index 0a25e81a..9b4489c5 100644
--- a/mppa_k1c/Asmblock.v
+++ b/mppa_k1c/Asmblock.v
@@ -15,7 +15,7 @@
(* *)
(* *********************************************************************)
-(** Abstract syntax and semantics for K1c assembly language. *)
+(** Sequential block semantics for K1c assembly. The syntax is given in AsmVLIW *)
Require Import Coqlib.
Require Import Maps.
@@ -172,7 +172,6 @@ Proof.
Qed.
Ltac bblock_auto_correct := (apply non_empty_bblock_refl; try discriminate; try (left; discriminate); try (right; discriminate)).
-(* Local Obligation Tactic := bblock_auto_correct. *)
Lemma Istrue_proof_irrelevant (b: bool): forall (p1 p2:Is_true b), p1=p2.
Proof.
@@ -250,9 +249,6 @@ Proof.
intros. destruct bb as [hd bdy ex COR]. simpl. unfold no_header; unfold stick_header; simpl. reflexivity.
Qed.
-
-
-
(** * Sequential Semantics of basic blocks *)
Section RELSEM.
@@ -302,29 +298,8 @@ Fixpoint exec_body (body: list basic) (rs: regset) (m: mem): outcome :=
Definition goto_label (f: function) (lbl: label) (rs: regset) (m: mem) : outcome := par_goto_label f lbl rs rs m.
-(** Evaluating a branch
-
-Warning: in m PC is assumed to be already pointing on the next instruction !
-
-*)
Definition eval_branch (f: function) (l: label) (rs: regset) (m: mem) (res: option bool) : outcome := par_eval_branch f l rs rs m res.
-(** Execution of a single control-flow instruction [i] in initial state [rs] and
- [m]. Return updated state.
-
- As above: PC is assumed to be incremented on the next block before the control-flow instruction
-
- For instructions that correspond tobuiltin
- actual RISC-V instructions, the cases are straightforward
- transliterations of the informal descriptions given in the RISC-V
- user-mode specification. For pseudo-instructions, refer to the
- informal descriptions given above.
-
- Note that we set to [Vundef] the registers used as temporaries by
- the expansions of the pseudo-instructions, so that the RISC-V code
- we generate cannot use those registers to hold values that must
- survive the execution of the pseudo-instruction. *)
-
Definition exec_control (f: function) (oc: option control) (rs: regset) (m: mem) : outcome := parexec_control ge f oc rs rs m.
Definition exec_bblock (f: function) (b: bblock) (rs0: regset) (m: mem) : outcome :=
@@ -368,16 +343,11 @@ Inductive step: state -> trace -> state -> Prop :=
step (State rs m) t (State rs' m')
.
-
-
End RELSEM.
-
-
Definition semantics (p: program) :=
Semantics step (initial_state p) final_state (Genv.globalenv p).
-
Definition data_preg (r: preg) : bool :=
match r with
| RA => false
@@ -386,4 +356,3 @@ Definition data_preg (r: preg) : bool :=
| IR _ => true
| PC => false
end.
-