aboutsummaryrefslogtreecommitdiffstats
path: root/arm/SelectOpproof.v
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2019-04-15 17:50:30 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-05-20 18:00:46 +0200
commit49342474c19558709c8cea6d70eaba9a4dd7a150 (patch)
tree86fb6e9fc2081a71a2d770811164bb2f72b867e6 /arm/SelectOpproof.v
parent996f2e071baaf52105714283d141af2eac8ffbfb (diff)
downloadcompcert-kvx-49342474c19558709c8cea6d70eaba9a4dd7a150.tar.gz
compcert-kvx-49342474c19558709c8cea6d70eaba9a4dd7a150.zip
Implement a `Osel` operation for ARM
The operation comples down to conditional moves. Both integer and floating-point conditional moves are supported.
Diffstat (limited to 'arm/SelectOpproof.v')
-rw-r--r--arm/SelectOpproof.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/arm/SelectOpproof.v b/arm/SelectOpproof.v
index d4aac9b6..f281f7ce 100644
--- a/arm/SelectOpproof.v
+++ b/arm/SelectOpproof.v
@@ -735,6 +735,20 @@ Proof.
intros; red; intros. unfold compfs. TrivialExists.
Qed.
+Theorem eval_select:
+ forall le ty cond al vl a1 v1 a2 v2 a b,
+ select ty cond al a1 a2 = Some a ->
+ eval_exprlist ge sp e m le al vl ->
+ 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,
+ eval_expr ge sp e m le a v
+ /\ Val.lessdef (Val.select (Some b) v1 v2 ty) v.
+Proof.
+ unfold select; intros; inv H. rewrite <- H3; TrivialExists.
+Qed.
+
Theorem eval_cast8signed: unary_constructor_sound cast8signed (Val.sign_ext 8).
Proof.
red; intros until x. unfold cast8signed; case (cast8signed_match a); intros.