aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/ValueAOp.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2019-04-14 10:47:14 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-05-20 18:00:46 +0200
commit43e7b6702a76306f20687bc9aba93ae465d6e4be (patch)
tree48531b9f57986b01315d2b3f87f8ac43b72c4c42 /powerpc/ValueAOp.v
parent72ab6ad1dcf13dd61d3bdb896660b0f399e9f8a5 (diff)
downloadcompcert-kvx-43e7b6702a76306f20687bc9aba93ae465d6e4be.tar.gz
compcert-kvx-43e7b6702a76306f20687bc9aba93ae465d6e4be.zip
Implement a `Osel` operation for PowerPC
This operation compiles down to an `isel` instruction (conditional move). The semantics is given by `Val.select`.
Diffstat (limited to 'powerpc/ValueAOp.v')
-rw-r--r--powerpc/ValueAOp.v2
1 files changed, 2 insertions, 0 deletions
diff --git a/powerpc/ValueAOp.v b/powerpc/ValueAOp.v
index f7f65e9e..a270d857 100644
--- a/powerpc/ValueAOp.v
+++ b/powerpc/ValueAOp.v
@@ -141,6 +141,7 @@ Definition eval_static_operation (op: operation) (vl: list aval): aval :=
| Olowlong, v1::nil => loword v1
| Ohighlong, v1::nil => hiword v1
| Ocmp c, _ => of_optbool (eval_static_condition c vl)
+ | Osel c ty, v1::v2::vl => select (eval_static_condition c vl) v1 v2
| _, _ => Vbot
end.
@@ -211,6 +212,7 @@ Proof.
apply rolml_sound; auto.
apply floatofwords_sound; auto.
apply of_optbool_sound. eapply eval_static_condition_sound; eauto.
+ apply select_sound; auto. eapply eval_static_condition_sound; eauto.
Qed.
End SOUNDNESS.