public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] ARM: Fix IEEE-754 sqrt implementation
@ 2017-03-22  9:06 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2017-03-22  9:06 UTC (permalink / raw)
  To: newlib-cvs

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

commit ffbfb332d628f97e3094dacecf3c42f8de07cd1f
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Tue Mar 21 15:47:34 2017 +0100

    ARM: Fix IEEE-754 sqrt implementation
    
    Older GCC (e.g. 4.9.3) seem to define __ARM_FP even in case soft-float
    is used.

Diff:
---
 newlib/libm/machine/arm/e_sqrt.c  | 2 +-
 newlib/libm/machine/arm/ef_sqrt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/newlib/libm/machine/arm/e_sqrt.c b/newlib/libm/machine/arm/e_sqrt.c
index 8754b9f..6f3eb83 100644
--- a/newlib/libm/machine/arm/e_sqrt.c
+++ b/newlib/libm/machine/arm/e_sqrt.c
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-#if __ARM_FP & 0x8
+#if (__ARM_FP & 0x8) && !defined(__SOFTFP__)
 #include <math.h>
 
 double
diff --git a/newlib/libm/machine/arm/ef_sqrt.c b/newlib/libm/machine/arm/ef_sqrt.c
index 81c29f1..3a1ba6c 100644
--- a/newlib/libm/machine/arm/ef_sqrt.c
+++ b/newlib/libm/machine/arm/ef_sqrt.c
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-#if __ARM_FP & 0x4
+#if (__ARM_FP & 0x4) && !defined(__SOFTFP__)
 #include <math.h>
 
 float


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-22  9:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22  9:06 [newlib-cygwin] ARM: Fix IEEE-754 sqrt implementation Corinna Vinschen

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).