From a0aaa3552d53b20a99566ac7116063fbb31b9964 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 3 Jul 2013 15:07:17 +0000 Subject: 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 --- backend/CMtypecheck.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'backend/CMtypecheck.ml') diff --git a/backend/CMtypecheck.ml b/backend/CMtypecheck.ml index 1ca13ff..f78f470 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 -- cgit v1.2.3