aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorTies Stuij <ties.stuij@arm.com>2021-04-21 13:48:03 +0100
committerRichard Earnshaw <rearnsha@arm.com>2021-04-21 16:18:09 +0100
commit282445a10ebda592a0bb0e947725e1205b8436d3 (patch)
tree484950a357369c0b90a7d82bbee4ead40a9fae50 /newlib
parent8050ef207494e6d227e968cc7e5850153f943320 (diff)
downloadnewlib-282445a10ebda592a0bb0e947725e1205b8436d3.zip
newlib-282445a10ebda592a0bb0e947725e1205b8436d3.tar.gz
newlib-282445a10ebda592a0bb0e947725e1205b8436d3.tar.bz2
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.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libm/machine/arm/sf_ceil.c2
-rw-r--r--newlib/libm/machine/arm/sf_floor.c2
-rw-r--r--newlib/libm/machine/arm/sf_nearbyint.c2
-rw-r--r--newlib/libm/machine/arm/sf_rint.c2
-rw-r--r--newlib/libm/machine/arm/sf_round.c2
-rw-r--r--newlib/libm/machine/arm/sf_trunc.c2
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 b6efbff..44fdf83 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 7bc9580..44c38c4 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 c70d844..126673e 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 d9c383a..5def210 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 232fc08..88c53ba 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 64e4aeb..c08fa6f 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