aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-02-02 10:36:49 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-02-02 10:36:49 +0100
commit5dfa2de0e1ba0acd36584983afefd9af1f5c2262 (patch)
tree558183e67679e4087158a3e239102bb3a76c4aa9
parentd2159e300b2d5e017a3144c747d34949b2ff2769 (diff)
downloadcompcert-kvx-5dfa2de0e1ba0acd36584983afefd9af1f5c2262.tar.gz
compcert-kvx-5dfa2de0e1ba0acd36584983afefd9af1f5c2262.zip
asmgen Oselectl
-rw-r--r--riscV/Asmgen.v7
-rw-r--r--riscV/Asmgenproof1.v4
2 files changed, 11 insertions, 0 deletions
diff --git a/riscV/Asmgen.v b/riscV/Asmgen.v
index debe1928..b87d2692 100644
--- a/riscV/Asmgen.v
+++ b/riscV/Asmgen.v
@@ -722,6 +722,13 @@ Definition transl_op
do rd <- ireg_of res;
transl_cond_op cmp rd args k
+ | Oselectl, b::t::f::nil =>
+ do rd <- ireg_of res;
+ do rb <- ireg_of b;
+ do rt <- ireg_of t;
+ do rf <- ireg_of f;
+ OK (Pselectl rd rb rt rf :: k)
+
| _, _ =>
Error(msg "Asmgen.transl_op")
end.
diff --git a/riscV/Asmgenproof1.v b/riscV/Asmgenproof1.v
index d2255e66..5940802c 100644
--- a/riscV/Asmgenproof1.v
+++ b/riscV/Asmgenproof1.v
@@ -1138,6 +1138,10 @@ Opaque Int.eq.
- (* cond *)
exploit transl_cond_op_correct; eauto. intros (rs' & A & B & C).
exists rs'; split. eexact A. eauto with asmgen.
+- (* select *)
+ econstructor; split. apply exec_straight_one. simpl; eauto. auto.
+ split; intros; Simpl.
+ apply Val.lessdef_normalize.
Qed.
(** Memory accesses *)