From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
To: Ties Stuij <ties.stuij@arm.com>, newlib@sourceware.org
Subject: Re: [PATCH] fix some Arm FP routines not checking if floating point is enabled
Date: Wed, 21 Apr 2021 16:19:04 +0100 [thread overview]
Message-ID: <e59c184e-f398-8017-f09a-f31d2a682236@foss.arm.com> (raw)
In-Reply-To: <VI1PR08MB2669DE96DDD924C8D71932949F479@VI1PR08MB2669.eurprd08.prod.outlook.com>
Pushed.
R.
On 21/04/2021 13:48, Ties Stuij wrote:
> 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.
> ---
> 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
>
next prev parent reply other threads:[~2021-04-21 15:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 12:48 Ties Stuij
2021-04-21 15:19 ` Richard Earnshaw [this message]
2021-04-21 12:56 Ties Stuij
2021-04-21 13:08 ` Joel Sherrill
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=e59c184e-f398-8017-f09a-f31d2a682236@foss.arm.com \
--to=richard.earnshaw@foss.arm.com \
--cc=newlib@sourceware.org \
--cc=ties.stuij@arm.com \
/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).