From bdac1f6aba5370b21b34c9ee12429c3920b3dffb Mon Sep 17 00:00:00 2001 From: xleroy Date: Mon, 8 Jul 2013 08:38:02 +0000 Subject: Revised handling of int->float conversions: - introduce Float.floatofint{,u} and use it in the semantics of C - prove that it is equivalent to int->double conversion followed by double->float rounding, and use this fact to justify code generation in Cshmgen. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2294 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- cfrontend/SimplLocalsproof.v | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cfrontend/SimplLocalsproof.v') diff --git a/cfrontend/SimplLocalsproof.v b/cfrontend/SimplLocalsproof.v index ad8a06a..83e7375 100644 --- a/cfrontend/SimplLocalsproof.v +++ b/cfrontend/SimplLocalsproof.v @@ -286,7 +286,10 @@ Proof. destruct v; inv H. constructor. (* float *) destruct ty; simpl in H; try discriminate; destruct v; inv H. - constructor. apply cast_float_float_idem. + constructor. unfold cast_float_float, cast_int_float. + destruct f; destruct s; auto. + rewrite Float.singleofint_floatofint. apply Float.singleoffloat_idem. + rewrite Float.singleofintu_floatofintu. apply Float.singleoffloat_idem. constructor. unfold cast_float_float, cast_long_float. destruct f; destruct s; auto. apply Float.singleoflong_idem. apply Float.singleoflongu_idem. constructor. apply cast_float_float_idem. -- cgit v1.2.3