public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Remove unused TOINT_RINT and TOINT_SHIFT macros
Date: Fri, 06 Jul 2018 08:44:00 -0000	[thread overview]
Message-ID: <20180706084445.61080.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=73a3e95ff2b08c61f2a046ffc543ae6eee589b03

commit 73a3e95ff2b08c61f2a046ffc543ae6eee589b03
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
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);


                 reply	other threads:[~2018-07-06  8:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180706084445.61080.qmail@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).