[PATCH v2] ieee754/dbl-64: Reduce the scope of temporary storage variables

2020-06-01 Thread Vineet Gupta
This came to light when adding hard-flaot support to ARC glibc port without hardware sqrt support causing glibc build to fail: | ../sysdeps/ieee754/dbl-64/e_sqrt.c: In function '__ieee754_sqrt': | ../sysdeps/ieee754/dbl-64/e_sqrt.c:58:54: error: unused variable 'ty' [-Werror=unused-variable] |

[PATCH v2 1/4] iee754: provide gcc builtins based generic sqrt functions

2020-06-01 Thread Vineet Gupta
Reviewed-by: Adhemerval Zanella --- sysdeps/generic/math-use-builtins.h | 3 +++ sysdeps/ieee754/dbl-64/e_sqrt.c | 6 ++ sysdeps/ieee754/flt-32/e_sqrtf.c| 16 ++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/sysdeps/generic/math-use-builtins.h b/sys

[PATCH v2 2/4] iee754: provide gcc builtins based generic fma functions

2020-06-01 Thread Vineet Gupta
--- sysdeps/generic/math-use-builtins.h | 5 + sysdeps/ieee754/dbl-64/s_fma.c | 6 ++ sysdeps/ieee754/dbl-64/s_fmaf.c | 6 ++ sysdeps/ieee754/float128/float128_private.h | 2 ++ sysdeps/ieee754/ldbl-128/s_fmal.c | 5 + 5 files changed, 24

[PATCH v2 0/4] Enable generic math code for more arches

2020-06-01 Thread Vineet Gupta
Hi, This was suggested by Adhemerval Zanella as part of ARC hard float review. There was testing snafu last time around (wrong branch on build server). Although only relevant configs are aarch64 and PPC, the series passes build-many-glibcs for following: ARCH="aarch64-linux-gnu arm-linux-gnueabi

[PATCH v2 4/4] powerpc/fpu: use generic fma functions

2020-06-01 Thread Vineet Gupta
This is supposed to be a non functional change Passes build-many for powerpc-linux-gnu Reviewed-by: Adhemerval Zanella --- sysdeps/powerpc/fpu/math-use-builtins.h | 69 + sysdeps/powerpc/fpu/s_fma.c | 27 -- sysdeps/powerpc/fpu/s_fmaf.c| 2

[PATCH v2 3/4] aarch/fpu: use generic builtins based math functions

2020-06-01 Thread Vineet Gupta
introduce sysdep header math-use-builtins.h to replace aarch64 impementations with corresponding generic ones - newly inroduced generic sqrt{,f}, fma{,f} - existing floor{,f}, nearbyint{,f}, rint{,f}, round{,f}, trunc{,f} - Note that generic copysign was already enabled (via generic math-use

[PATCH v2 2/2] ARC/dl-runtime helper macros

2020-06-01 Thread Vineet Gupta
This is purely for review purposes to attest the interface defined in prior patch --- sysdeps/arc/dl-runtime.h | 42 1 file changed, 42 insertions(+) create mode 100644 sysdeps/arc/dl-runtime.h diff --git a/sysdeps/arc/dl-runtime.h b/sysdeps/arc/dl-runtim

[PATCH v2 0/2] rework dl-runtime: reloc_{offset,index}

2020-06-01 Thread Vineet Gupta
Vineet Gupta (2): dl-runtime: reloc_{offset,index} now functions arch overide'able ARC/dl-runtime helper macros elf/dl-runtime.c| 28 +++-- elf/dl-runtime.h| 30 ++ sysdeps/arc/dl-runtime.h| 42 +++

[PATCH v2 1/2] dl-runtime: reloc_{offset, index} now functions arch overide'able

2020-06-01 Thread Vineet Gupta
The existing macros are fragile and expect local variables with a certain name. Fix this by defining them as functions with default implementation in a new header dl-runtime.h which arches can override if need be. This came up during ARC port review, hence the need for argument pltgot in reloc_ind

Re: [PATCH 4/5] aarch/fpu: use generic sqrt, fma functions

2020-06-01 Thread Ramana Radhakrishnan
On Mon, Jun 1, 2020 at 10:45 PM Vineet Gupta via Libc-alpha wrote: > > On 6/1/20 9:38 AM, Adhemerval Zanella via Libc-alpha wrote: > > > > > > On 29/05/2020 23:00, Vineet Gupta wrote: > >> Signed-off-by: Vineet Gupta > > > > LGTM, some comments below. > > > >> -#include > >> -#include > >> - >

Re: [PATCH 4/5] aarch/fpu: use generic sqrt, fma functions

2020-06-01 Thread Vineet Gupta
On 6/1/20 9:38 AM, Adhemerval Zanella via Libc-alpha wrote: > > > On 29/05/2020 23:00, Vineet Gupta wrote: >> Signed-off-by: Vineet Gupta > > LGTM, some comments below. > >> -#include >> -#include >> - >> -double >> -__ieee754_sqrt (double d) >> -{ >> - return __builtin_sqrt (d); >> -} >> -

Re: [PATCH v6 03/13] ARC: Thread Local Storage support

2020-06-01 Thread Adhemerval Zanella
On 27/05/2020 22:36, Vineet Gupta wrote: > On 5/27/20 12:17 PM, Adhemerval Zanella via Libc-alpha wrote: >> >> >> On 22/04/2020 22:41, Vineet Gupta via Libc-alpha wrote: >>> This includes all 4 TLS addressing models >>> >>> Signed-off-by: Vineet Gupta >> >> As prior patch we do not use DCO, but

Re: [PATCH 2/5] iee754: prvoide gcc builtins based generic sqrt functions

2020-06-01 Thread Adhemerval Zanella
On 01/06/2020 15:12, Vineet Gupta wrote: > On 6/1/20 7:42 AM, Adhemerval Zanella via Libc-alpha wrote: >> You will need to move this definitions inside the !USE_SQRTF_BUILTIN >> to avoid defined by not used warnings. Current practice is to just >> open code the constants and let compiler optimi

Re: [PATCH 2/5] iee754: prvoide gcc builtins based generic sqrt functions

2020-06-01 Thread Vineet Gupta
On 6/1/20 7:42 AM, Adhemerval Zanella via Libc-alpha wrote: > You will need to move this definitions inside the !USE_SQRTF_BUILTIN > to avoid defined by not used warnings. Current practice is to just > open code the constants and let compiler optimize the constant pool: Won't it be better to keep

Re: [PATCH 2/5] iee754: prvoide gcc builtins based generic sqrt functions

2020-06-01 Thread Vineet Gupta
On 6/1/20 7:18 AM, Florian Weimer wrote: > There's a typo in commit subject: “prvoide”. oops sorry, fixed now. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 5/5] powerpc/fpu: use generic fma functions

2020-06-01 Thread Adhemerval Zanella
On 29/05/2020 23:00, Vineet Gupta wrote: LGTM, thanks. This new addition, along with the aarch64 one, makes me wonder if it would be better to decompose the USE_* defined in multiple files so the architecture adds only the required ones (instead of copy/paste the whole file with the generic on

Re: [PATCH 4/5] aarch/fpu: use generic sqrt, fma functions

2020-06-01 Thread Adhemerval Zanella
On 29/05/2020 23:00, Vineet Gupta wrote: > Signed-off-by: Vineet Gupta LGTM, some comments below. > --- > sysdeps/aarch64/fpu/e_sqrt.c| 27 -- > sysdeps/aarch64/fpu/e_sqrtf.c | 27 -- > sysdeps/aarch64/fpu/math-use-builtins.h | 70 +++

Re: [PATCH 3/5] iee754: prvoide gcc builtins based generic fma functions

2020-06-01 Thread Florian Weimer
The commit subject contains a typo (“prvoide”). ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 2/5] iee754: prvoide gcc builtins based generic sqrt functions

2020-06-01 Thread Adhemerval Zanella
On 01/06/2020 11:13, Adhemerval Zanella wrote: > > > On 29/05/2020 23:00, Vineet Gupta wrote: > > LGTM, thanks. > > Reviewed-by: Adhemerval Zanella > >> --- >> sysdeps/generic/math-use-builtins.h | 3 +++ >> sysdeps/ieee754/dbl-64/e_sqrt.c | 6 ++ >> sysdeps/ieee754/flt-32/e_sqrt

Re: [PATCH 3/5] iee754: prvoide gcc builtins based generic fma functions

2020-06-01 Thread Adhemerval Zanella
On 29/05/2020 23:00, Vineet Gupta wrote: Ok with the fixes below. Reviewed-by: Adhemerval Zanella > --- > sysdeps/generic/math-use-builtins.h | 4 > sysdeps/ieee754/dbl-64/s_fma.c | 6 ++ > sysdeps/ieee754/dbl-64/s_fmaf.c | 6 ++ > sysdeps/ieee

Re: [PATCH 2/5] iee754: prvoide gcc builtins based generic sqrt functions

2020-06-01 Thread Florian Weimer
There's a typo in commit subject: “prvoide”. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 2/5] iee754: prvoide gcc builtins based generic sqrt functions

2020-06-01 Thread Adhemerval Zanella
On 29/05/2020 23:00, Vineet Gupta wrote: LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > sysdeps/generic/math-use-builtins.h | 3 +++ > sysdeps/ieee754/dbl-64/e_sqrt.c | 6 ++ > sysdeps/ieee754/flt-32/e_sqrtf.c| 6 ++ > 3 files changed, 15 insertions(+) > > diff --gi