aboutsummaryrefslogtreecommitdiffstats
path: root/powerpc/ConstpropOp.v
diff options
context:
space:
mode:
authorxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-10-28 14:56:39 +0000
committerxleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2010-10-28 14:56:39 +0000
commit14a9bb4b267eeead8cd9503ee19e860a8bc0d763 (patch)
treec70dda532a974a7b62969c6b199b80d65784dc91 /powerpc/ConstpropOp.v
parentb54721f58c2ecb65ce554d8b34f214d5121a2b0c (diff)
downloadcompcert-14a9bb4b267eeead8cd9503ee19e860a8bc0d763.tar.gz
compcert-14a9bb4b267eeead8cd9503ee19e860a8bc0d763.zip
Float.intoffloat and Float.intuoffloat are now partial functions.
(May fail if float is too big to be converted.) git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@1544 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'powerpc/ConstpropOp.v')
-rw-r--r--powerpc/ConstpropOp.v4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerpc/ConstpropOp.v b/powerpc/ConstpropOp.v
index b6eecc74..07a1872e 100644
--- a/powerpc/ConstpropOp.v
+++ b/powerpc/ConstpropOp.v
@@ -181,7 +181,7 @@ Definition eval_static_operation (op: operation) (vl: list approx) :=
| Omuladdf, F n1 :: F n2 :: F n3 :: nil => F(Float.add (Float.mul n1 n2) n3)
| Omulsubf, F n1 :: F n2 :: F n3 :: nil => F(Float.sub (Float.mul n1 n2) n3)
| Osingleoffloat, F n1 :: nil => F(Float.singleoffloat n1)
- | Ointoffloat, F n1 :: nil => I(Float.intoffloat n1)
+ | Ointoffloat, F n1 :: nil => match Float.intoffloat n1 with Some x => I x | None => Unknown end
| Ofloatofwords, I n1 :: I n2 :: nil => F(Float.from_words n1 n2)
| Ocmp c, vl =>
match eval_static_condition c vl with
@@ -518,7 +518,7 @@ Definition eval_static_operation (op: operation) (vl: list approx) :=
| eval_static_operation_case43 n1 =>
F(Float.singleoffloat n1)
| eval_static_operation_case44 n1 =>
- I(Float.intoffloat n1)
+ match Float.intoffloat n1 with Some x => I x | None => Unknown end
| eval_static_operation_case45 n1 n2 =>
F(Float.from_words n1 n2)
| eval_static_operation_case47 c vl =>