aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/SelectOpproof.v
diff options
context:
space:
mode:
authorBernhard Schommer <bschommer@users.noreply.github.com>2019-05-28 10:33:34 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-05-28 10:33:34 +0200
commite10555313645cf3c35f244f42afa5a03fba2bac1 (patch)
tree7b1e42b23ac78f5866681f12402d7c7aeceaecd3 /powerpc/SelectOpproof.v
parentc36514ac4b05f78dd2e02fab3f8886cab8234925 (diff)
downloadcompcert-kvx-e10555313645cf3c35f244f42afa5a03fba2bac1.tar.gz
compcert-kvx-e10555313645cf3c35f244f42afa5a03fba2bac1.zip
Provide a float select operation for PowerPC. (#173)
The FP select for PowerPC stores both addresses in two subsequent stack slots and loads them using an offset created from the result of the comparison.
Diffstat (limited to 'powerpc/SelectOpproof.v')
-rw-r--r--powerpc/SelectOpproof.v5
1 files changed, 3 insertions, 2 deletions
diff --git a/powerpc/SelectOpproof.v b/powerpc/SelectOpproof.v
index 5bf25722..5d7cd52b 100644
--- a/powerpc/SelectOpproof.v
+++ b/powerpc/SelectOpproof.v
@@ -1007,12 +1007,13 @@ Theorem eval_select:
eval_expr ge sp e m le a1 v1 ->
eval_expr ge sp e m le a2 v2 ->
eval_condition cond vl m = Some b ->
- exists v,
+
+ exists v,
eval_expr ge sp e m le a v
/\ Val.lessdef (Val.select (Some b) v1 v2 ty) v.
Proof.
unfold select; intros.
- destruct (match ty with Tint => true | Tlong => Archi.ppc64 | _ => false end); inv H.
+ destruct (match ty with Tint => true | Tfloat => true | Tsingle => true | Tlong => Archi.ppc64 | _ => false end); inv H.
exists (Val.select (Some b) v1 v2 ty); split.
apply eval_Eop with (v1 :: v2 :: vl).
constructor; auto. constructor; auto.