aboutsummaryrefslogtreecommitdiffstats
path: root/mppa_k1c/Asmblockgen.v
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-04 21:31:36 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-04-04 21:31:36 +0200
commit71c38724bee43fe1a2ce67ee51f09478cd167929 (patch)
tree60eaeefe805f8829b833cea6d966ee79ccf08dea /mppa_k1c/Asmblockgen.v
parent60ff9fd4c1387bf46fa702d564cfbba44a4f83ea (diff)
downloadcompcert-kvx-71c38724bee43fe1a2ce67ee51f09478cd167929.tar.gz
compcert-kvx-71c38724bee43fe1a2ce67ee51f09478cd167929.zip
Oselect
Diffstat (limited to 'mppa_k1c/Asmblockgen.v')
-rw-r--r--mppa_k1c/Asmblockgen.v12
1 files changed, 11 insertions, 1 deletions
diff --git a/mppa_k1c/Asmblockgen.v b/mppa_k1c/Asmblockgen.v
index ad01ff89..722c4acc 100644
--- a/mppa_k1c/Asmblockgen.v
+++ b/mppa_k1c/Asmblockgen.v
@@ -729,7 +729,17 @@ Definition transl_op
do rd <- ireg_of res;
transl_cond_op cmp rd args k
- | Oselect, a0 :: a1 :: aS :: nil
+ | Oselect cond, a0 :: a1 :: aS :: nil =>
+ assertion (mreg_eq a0 res);
+ do r0 <- ireg_of a0;
+ do r1 <- ireg_of a1;
+ do rS <- ireg_of aS;
+ (match cond with
+ | Ccomp0 cmp =>
+ OK (Pcmove (btest_for_cmpswz cmp) r0 rS r1 ::i k)
+ | _ => Error (msg "Asmblockgen Oselect")
+ end)
+
| Oselectl, a0 :: a1 :: aS :: nil
| Oselectf, a0 :: a1 :: aS :: nil
| Oselectfs, a0 :: a1 :: aS :: nil =>