public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH 10/13] s390: Use sqrt{f} builtin
Date: Wed, 10 Jun 2020 12:59:23 -0300	[thread overview]
Message-ID: <746405d8-5421-f99d-f4c8-5b1d55f3dece@linaro.org> (raw)
In-Reply-To: <20200610154508.GE15911@arm.com>



On 10/06/2020 12:45, Szabolcs Nagy wrote:
> The 06/10/2020 17:39, Stefan Liebler via Libc-alpha wrote:
>> Hi Adhemerval,
>>
>> my last tests with the sqrt builtin on s390x showed that gcc emits a
>> call to libm which would lead to an infinite loop:
>> if (x < 0)
>>  sqrt(x)
>> else
>>  sqdbr-instruction
> 
> in general the builtins based implementation
> must be compiled with -fno-math-errno if
> they have error conditions otherwise math-errno
> may cause the compiler not to do a single
> instruction inline like in this sqrt case.

Afaik libm is already build with -fno-math-errno with:

Makeconfig:849:+extra-math-flags = $(if $(filter libm,$(in-module)),-fno-math-errno,-fmath-errno)

And for some implementation (either default or compat ones)
we have specific wrapper (for instance w_sqrt_*) to handle
errno.

  reply	other threads:[~2020-06-10 15:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 21:32 [PATCH 01/13] math: Decompose math-use-builtins.h Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 02/13] aarch64: Use math-use-builtins for ceil{f} Adhemerval Zanella
2020-06-10 10:15   ` Szabolcs Nagy
2020-06-09 21:32 ` [PATCH 03/13] s390x: Use fma{f} builtin Adhemerval Zanella
2020-06-16 10:13   ` Stefan Liebler
2020-06-09 21:32 ` [PATCH 04/13] powerpc: Use sqrt{f} builtin Adhemerval Zanella
2020-06-10 14:22   ` Paul A. Clarke
2020-06-09 21:32 ` [PATCH 05/13] x86_64: Use builtin sqrt{f,l} Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 06/13] i386: Use builtin sqrtl Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 07/13] alpha: Use builtin sqrt{f} Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 08/13] mips: Use sqrt{f} builtin Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 09/13] sparc: " Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:32 ` [PATCH 10/13] s390: " Adhemerval Zanella
2020-06-10 15:39   ` Stefan Liebler
2020-06-10 15:45     ` Szabolcs Nagy
2020-06-10 15:59       ` Adhemerval Zanella [this message]
2020-06-16 10:13         ` Stefan Liebler
2020-06-09 21:32 ` [PATCH 11/13] riscv: " Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:33 ` [PATCH 12/13] arm: " Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-09 21:33 ` [PATCH 13/13] m68k: Use sqrt{f} builtin for coldfire Adhemerval Zanella
2020-06-19 19:17   ` Adhemerval Zanella
2020-06-16 10:13 ` [PATCH 01/13] math: Decompose math-use-builtins.h Stefan Liebler

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=746405d8-5421-f99d-f4c8-5b1d55f3dece@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@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).