diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-07-03 15:07:17 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2013-07-03 15:07:17 +0000 |
commit | a0aaa3552d53b20a99566ac7116063fbb31b9964 (patch) | |
tree | 72b86341e136accdba1c339230cee0f1ba5013d9 /backend/CMtypecheck.ml | |
parent | 18bbf6d3cfb15219c87ebc79a5dd58bf75f2b4c4 (diff) | |
download | compcert-a0aaa3552d53b20a99566ac7116063fbb31b9964.tar.gz compcert-a0aaa3552d53b20a99566ac7116063fbb31b9964.zip |
Treat casts int64 -> float32 as primitive operations instead of two
casts int64 -> float64 -> float32. The latter causes double rounding
errors.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2290 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/CMtypecheck.ml')
-rw-r--r-- | backend/CMtypecheck.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/CMtypecheck.ml b/backend/CMtypecheck.ml index 1ca13ff8..f78f4705 100644 --- a/backend/CMtypecheck.ml +++ b/backend/CMtypecheck.ml @@ -115,6 +115,8 @@ let type_unary_operation = function | Olonguoffloat -> tfloat, tlong | Ofloatoflong -> tlong, tfloat | Ofloatoflongu -> tlong, tfloat + | Osingleoflong -> tlong, tfloat + | Osingleoflongu -> tlong, tfloat let type_binary_operation = function | Oadd -> tint, tint, tint |