From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66718 invoked by alias); 6 Jul 2018 08:44:52 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 61092 invoked by uid 9078); 6 Jul 2018 08:44:45 -0000 Date: Fri, 06 Jul 2018 08:44:00 -0000 Message-ID: <20180706084445.61080.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Remove unused TOINT_RINT and TOINT_SHIFT macros X-Act-Checkin: newlib-cygwin X-Git-Author: Szabolcs Nagy X-Git-Refname: refs/heads/master X-Git-Oldrev: 393a1cb4eaeadbc67587a009328715bbc42e56b7 X-Git-Newrev: 73a3e95ff2b08c61f2a046ffc543ae6eee589b03 X-SW-Source: 2018-q3/txt/msg00004.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=73a3e95ff2b08c61f2a046ffc543ae6eee589b03 commit 73a3e95ff2b08c61f2a046ffc543ae6eee589b03 Author: Szabolcs Nagy Date: Thu Jul 5 12:42:13 2018 +0100 Remove unused TOINT_RINT and TOINT_SHIFT macros Only have separate code paths for TOINT_INTRINSICS and !TOINT_INTRINSICS. Diff: --- newlib/libm/common/math_config.h | 6 ------ newlib/libm/common/sf_exp.c | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h index 1f83756..b46e44e 100644 --- a/newlib/libm/common/math_config.h +++ b/newlib/libm/common/math_config.h @@ -93,12 +93,6 @@ converttoint (double_t x) #ifndef TOINT_INTRINSICS # define TOINT_INTRINSICS 0 #endif -#ifndef TOINT_RINT -# define TOINT_RINT 0 -#endif -#ifndef TOINT_SHIFT -# define TOINT_SHIFT 1 -#endif static inline uint32_t asuint (float f) diff --git a/newlib/libm/common/sf_exp.c b/newlib/libm/common/sf_exp.c index 79ec62b..5d72c34 100644 --- a/newlib/libm/common/sf_exp.c +++ b/newlib/libm/common/sf_exp.c @@ -88,10 +88,7 @@ expf (float x) #if TOINT_INTRINSICS kd = roundtoint (z); ki = converttoint (z); -#elif TOINT_RINT - kd = rint (z); - ki = (long) kd; -#elif TOINT_SHIFT +#else # define SHIFT __exp2f_data.shift kd = (double) (z + SHIFT); /* Rounding to double precision is required. */ ki = asuint64 (kd);