aboutsummaryrefslogtreecommitdiffstats
path: root/riscV/Asm.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-02-02 10:21:17 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-02-02 10:21:17 +0100
commitd2159e300b2d5e017a3144c747d34949b2ff2769 (patch)
tree2186636bc3f2e85b5effd19f9e7c23f4183545aa /riscV/Asm.v
parente0f1a90c2dcf7c43137064470ce4b12368b8435d (diff)
downloadcompcert-kvx-d2159e300b2d5e017a3144c747d34949b2ff2769.tar.gz
compcert-kvx-d2159e300b2d5e017a3144c747d34949b2ff2769.zip
begin implementing select
Diffstat (limited to 'riscV/Asm.v')
-rw-r--r--riscV/Asm.v8
1 files changed, 6 insertions, 2 deletions
diff --git a/riscV/Asm.v b/riscV/Asm.v
index d1946a06..9a4b2a57 100644
--- a/riscV/Asm.v
+++ b/riscV/Asm.v
@@ -63,10 +63,10 @@ Inductive freg: Type :=
| F24: freg | F25: freg | F26: freg | F27: freg
| F28: freg | F29: freg | F30: freg | F31: freg.
-Lemma ireg_eq: forall (x y: ireg), {x=y} + {x<>y}.
+Definition ireg_eq: forall (x y: ireg), {x=y} + {x<>y}.
Proof. decide equality. Defined.
-Lemma ireg0_eq: forall (x y: ireg0), {x=y} + {x<>y}.
+Definition ireg0_eq: forall (x y: ireg0), {x=y} + {x<>y}.
Proof. decide equality. apply ireg_eq. Defined.
Lemma freg_eq: forall (x y: freg), {x=y} + {x<>y}.
@@ -348,6 +348,7 @@ Inductive instruction : Type :=
| Pbtbl (r: ireg) (tbl: list label) (**r N-way branch through a jump table *)
| Pbuiltin: external_function -> list (builtin_arg preg)
-> builtin_res preg -> instruction (**r built-in function (pseudo) *)
+ | Pselectl (rd: ireg) (rb: ireg0) (rt: ireg0) (rf: ireg0)
| Pnop : instruction. (**r nop instruction *)
@@ -954,6 +955,9 @@ Definition exec_instr (f: function) (i: instruction) (rs: regset) (m: mem) : out
| _ => Stuck
end
end
+ | Pselectl rd rb rt rf =>
+ Next (nextinstr (rs#rd <- (ExtValues.select01_long
+ (rs###rb) (rs###rt) (rs###rf)))) m
| Plabel lbl =>
Next (nextinstr rs) m
| Ploadsymbol rd s ofs =>