* [PATCH] ARM: Fix IEEE-754 sqrt implementation
@ 2017-03-21 14:47 Sebastian Huber
2017-03-21 15:04 ` Sebastian Huber
2017-03-22 9:06 ` Corinna Vinschen
0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Huber @ 2017-03-21 14:47 UTC (permalink / raw)
To: newlib; +Cc: Sebastian Huber
Older GCC (e.g. 4.9.3) seem to define __ARM_FP even in case soft-float
is used.
---
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
--
1.8.4.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: Fix IEEE-754 sqrt implementation
2017-03-21 14:47 [PATCH] ARM: Fix IEEE-754 sqrt implementation Sebastian Huber
@ 2017-03-21 15:04 ` Sebastian Huber
2017-03-22 9:06 ` Corinna Vinschen
1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Huber @ 2017-03-21 15:04 UTC (permalink / raw)
To: Newlib
On 21/03/17 15:47, Sebastian Huber wrote:
> Older GCC (e.g. 4.9.3) seem to define __ARM_FP even in case soft-float
> is used.
Just for reference, this bug in GCC was fixed by:
commit dc44066f660f9b7d9de7a71ec37a9634fa6b1752
Author: alalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Feb 5 16:58:58 2015 +0000
[ARM] __ARM_FP & __ARM_NEON_FP defined when -march=armv7-m
gcc/:
* config/arm/arm.h (TARGET_NEON_FP): Removed conditional
definition,
define to zero if !TARGET_NEON.
(TARGET_CPU_CPP_BUILTINS): Added second condition before defining
__ARM_FP macro.
gcc/testsuite/:
* gcc.target/arm/macro_defs0.c: New test.
* gcc.target/arm/macro_defs1.c: New test.
* gcc.target/arm/macro_defs2.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220456
138bc75d-0d04-0410-961f-82ee72b054a4
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: Fix IEEE-754 sqrt implementation
2017-03-21 14:47 [PATCH] ARM: Fix IEEE-754 sqrt implementation Sebastian Huber
2017-03-21 15:04 ` Sebastian Huber
@ 2017-03-22 9:06 ` Corinna Vinschen
1 sibling, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2017-03-22 9:06 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]
On Mar 21 15:47, Sebastian Huber wrote:
> Older GCC (e.g. 4.9.3) seem to define __ARM_FP even in case soft-float
> is used.
> ---
> 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
> --
> 1.8.4.5
Pushed.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-22 9:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 14:47 [PATCH] ARM: Fix IEEE-754 sqrt implementation Sebastian Huber
2017-03-21 15:04 ` Sebastian Huber
2017-03-22 9:06 ` 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).