aboutsummaryrefslogtreecommitdiffstats
path: root/arm/SelectOp.vp
diff options
context:
space:
mode:
Diffstat (limited to 'arm/SelectOp.vp')
-rw-r--r--arm/SelectOp.vp9
1 files changed, 8 insertions, 1 deletions
diff --git a/arm/SelectOp.vp b/arm/SelectOp.vp
index 61ea6283..d04832d6 100644
--- a/arm/SelectOp.vp
+++ b/arm/SelectOp.vp
@@ -383,7 +383,14 @@ Definition compfs (c: comparison) (e1: expr) (e2: expr) :=
Eop (Ocmp (Ccompfs c)) (e1 ::: e2 ::: Enil).
Definition select (ty: typ) (cond: condition) (args: exprlist) (e1 e2: expr) :=
- Some (Eop (Osel cond ty) (e1 ::: e2 ::: args)).
+ if match ty with
+ | Tint => true
+ | Tfloat => true
+ | Tsingle => true
+ | _ => false
+ end
+ then Some (Eop (Osel cond ty) (e1 ::: e2 ::: args))
+ else None.
(** ** Integer conversions *)