public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] fix some Arm FP routines not checking if floating point is enabled
Date: Wed, 21 Apr 2021 15:19:58 +0000 (GMT)	[thread overview]
Message-ID: <20210421151958.358CD3892449@sourceware.org> (raw)

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

commit 282445a10ebda592a0bb0e947725e1205b8436d3
Author: Ties Stuij <ties.stuij@arm.com>
Date:   Wed Apr 21 13:48:03 2021 +0100

    fix some Arm FP routines not checking if floating point is enabled
    
    A lot of the Arm FP routines check for the availability of floating point by way
    of `(__ARM_FP & 0x4)`. However some do not. This patch remedies this.

Diff:
---
 newlib/libm/machine/arm/sf_ceil.c      | 2 +-
 newlib/libm/machine/arm/sf_floor.c     | 2 +-
 newlib/libm/machine/arm/sf_nearbyint.c | 2 +-
 newlib/libm/machine/arm/sf_rint.c      | 2 +-
 newlib/libm/machine/arm/sf_round.c     | 2 +-
 newlib/libm/machine/arm/sf_trunc.c     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/newlib/libm/machine/arm/sf_ceil.c b/newlib/libm/machine/arm/sf_ceil.c
index b6efbff0b..44fdf834a 100644
--- a/newlib/libm/machine/arm/sf_ceil.c
+++ b/newlib/libm/machine/arm/sf_ceil.c
@@ -24,7 +24,7 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__)
 #include <math.h>
 
 float
diff --git a/newlib/libm/machine/arm/sf_floor.c b/newlib/libm/machine/arm/sf_floor.c
index 7bc95808c..44c38c42c 100644
--- a/newlib/libm/machine/arm/sf_floor.c
+++ b/newlib/libm/machine/arm/sf_floor.c
@@ -24,7 +24,7 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__)
 #include <math.h>
 
 float
diff --git a/newlib/libm/machine/arm/sf_nearbyint.c b/newlib/libm/machine/arm/sf_nearbyint.c
index c70d84442..126673e97 100644
--- a/newlib/libm/machine/arm/sf_nearbyint.c
+++ b/newlib/libm/machine/arm/sf_nearbyint.c
@@ -24,7 +24,7 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__)
 #include <math.h>
 
 float
diff --git a/newlib/libm/machine/arm/sf_rint.c b/newlib/libm/machine/arm/sf_rint.c
index d9c383a7e..5def21009 100644
--- a/newlib/libm/machine/arm/sf_rint.c
+++ b/newlib/libm/machine/arm/sf_rint.c
@@ -24,7 +24,7 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__)
 #include <math.h>
 
 float
diff --git a/newlib/libm/machine/arm/sf_round.c b/newlib/libm/machine/arm/sf_round.c
index 232fc0848..88c53ba13 100644
--- a/newlib/libm/machine/arm/sf_round.c
+++ b/newlib/libm/machine/arm/sf_round.c
@@ -24,7 +24,7 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__)
 #include <math.h>
 
 float
diff --git a/newlib/libm/machine/arm/sf_trunc.c b/newlib/libm/machine/arm/sf_trunc.c
index 64e4aeb9a..c08fa6fed 100644
--- a/newlib/libm/machine/arm/sf_trunc.c
+++ b/newlib/libm/machine/arm/sf_trunc.c
@@ -24,7 +24,7 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 
-#if __ARM_ARCH >= 8 && !defined (__SOFTFP__)
+#if __ARM_ARCH >= 8 && (__ARM_FP & 0x4) && !defined (__SOFTFP__)
 #include <math.h>
 
 float


                 reply	other threads:[~2021-04-21 15:19 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=20210421151958.358CD3892449@sourceware.org \
    --to=rearnsha@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).