From f4b41226d60ca57c5981b0a46e0a495152b5301f Mon Sep 17 00:00:00 2001 From: xleroy Date: Fri, 30 May 2008 12:27:15 +0000 Subject: Introduction de l'operation intuoffloat (float -> unsigned int). Pas encore utilisee dans le front-end C. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@647 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e --- common/Values.v | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/Values.v') diff --git a/common/Values.v b/common/Values.v index 80c5c93e..19772446 100644 --- a/common/Values.v +++ b/common/Values.v @@ -119,6 +119,12 @@ Definition intoffloat (v: val) : val := | _ => Vundef end. +Definition intuoffloat (v: val) : val := + match v with + | Vfloat f => Vint (Float.intuoffloat f) + | _ => Vundef + end. + Definition floatofint (v: val) : val := match v with | Vint n => Vfloat (Float.floatofint n) -- cgit