On 6/2/20 7:13 PM, Vineet Gupta wrote:
> On 6/2/20 5:51 AM, Stefan Liebler via Libc-alpha wrote:
>> #endif /* math-use-builtins.h */
>> Please also update the current architecture specific math-use-builtins.h
>> file: sysdeps/s390/fpu/math-use-builtins.h
>> Otherwise it will break build on s390x.
On 6/2/20 10:27 AM, Adhemerval Zanella via Libc-alpha wrote:
>> I used commit f82996f815 "Use GCC builtins for round functions if desired" as
>> starting point for my change. And seems it was not an ideal reference :-) as
>> round
>> has far fewer instances than fma. Indeed fma is present in ldbl-
Hi,
This was suggested by Adhemerval Zanella as part of ARC hard float
review.
changes since v2:
- Add new defines (0) to s390 too as suggested by Stephan
- Handle USE_FMA_BUILTIN in both sysdeps/ieee754/{dbl-64,ldbl-128}/s_fma.c
- Add diff output for all arches build tested
build-glibc-ma
Tested with build-many-glibcs for powerpc-linux-gnu
This is a non functional change and powerpc libm before/after was
byte invariant as compared below:
| cd /SCRATCH/vgupta/gnu/install-glibc-A-baseline
| for i in `find . -name libm-2.31.9000.so`; do
| echo $i; diff $i /SCRATCH/vgupta/gnu/instal
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 ++--
sysdeps/s390/fpu/math-use-builtins.h | 3 +++
4 files changed, 22 insertions(+), 6 deletions(-)
diff
introduce sysdep header math-use-builtins.h to replace aarch64
implementations 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-u
Reviewed-by: Adhemerval Zanella
---
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_fma.c
On 6/2/20 11:16 AM, Joseph Myers wrote:
> On Mon, 1 Jun 2020, Vineet Gupta via Libc-alpha wrote:
>
>> Also as suggested by Joseph [1] used --strip and compared the libs with
>> and w/o patch and their sizes are exactly same (with gcc 9).
>
> My suggestion was to compare the *contents* of the libr
On 6/2/20 10:31 AM, Adhemerval Zanella via Libc-alpha wrote:
>
>
> On 01/06/2020 21:35, Vineet Gupta wrote:
>> introduce sysdep header math-use-builtins.h to replace aarch64
>> impementations with corresponding generic ones
>
> s/impementations/implementations and missing ':'.
Fixed.
>> - new
On 02/06/2020 15:13, Joseph Myers wrote:
> On Tue, 2 Jun 2020, Vineet Gupta via Libc-alpha wrote:
>
>> Thi s approach seems to trip math/check-installed-headers.out
>>
>>
>> -std=c89
>> In file included from ../include/fpu_control.h:2,
>> from /tmp/cih_test_Nknxdp.c:8:
>> ../sysdeps/arc/fp
On Mon, 1 Jun 2020, Vineet Gupta via Libc-alpha wrote:
> Also as suggested by Joseph [1] used --strip and compared the libs with
> and w/o patch and their sizes are exactly same (with gcc 9).
My suggestion was to compare the *contents* of the libraries, not just
their sizes. Either they should
On Tue, 2 Jun 2020, Vineet Gupta via Libc-alpha wrote:
> Thi s approach seems to trip math/check-installed-headers.out
>
>
> -std=c89
> In file included from ../include/fpu_control.h:2,
> from /tmp/cih_test_Nknxdp.c:8:
> ../sysdeps/arc/fpu_control.h:82:14: error: expected ';' before 'unsign
On Mon, 1 Jun 2020, Vineet Gupta via Libc-alpha wrote:
> Also I don't understand one thing. Both the generic and aarch64 code have this
>
> float
> __rintf (float x)
> ...
> libm_alias_float (__rint, rint)
>
> The alias arg 1 __rint seems to lack suffix 'f' ?
Please see the comments in sysdeps/
On Fri, 29 May 2020, Vineet Gupta via Libc-alpha wrote:
> Something like below ?
>
> +# define _FPU_FPSR_FWE 0x8000
> +
> -# define _FPU_GETCW(cw) __asm__ volatile ("lr %0, [0x300]" : "=r" (cw))
> -# define _FPU_SETCW(cw) __asm__ volatile ("sr %0, [0x300]" : : "r" (cw))
> +sta
On Fri, 29 May 2020, Vineet Gupta via Libc-alpha wrote:
> Side question: what do s_ / e_ prefixes mean?
> The suffix is clear s_roundf (float), s_round (double), s_roundl (128).
I don't know what they stand for (the naming convention probably
originates from fdlibm, or at least much of the code
On 01/06/2020 21:35, Vineet Gupta wrote:
> introduce sysdep header math-use-builtins.h to replace aarch64
> impementations with corresponding generic ones
s/impementations/implementations and missing ':'.
>
> - newly inroduced generic sqrt{,f}, fma{,f}
> - existing floor{,f}, nearbyint{,f},
On 01/06/2020 21:35, Vineet Gupta wrote:
> ---
> 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/ldb
On 01/06/2020 21:35, Vineet Gupta wrote:
> Reviewed-by: Adhemerval Zanella
LGTM with the small nit below and the s390 fix pointed by Stefan.
Reviewed-by: Adhemerval Zanella
> ---
> sysdeps/generic/math-use-builtins.h | 3 +++
> sysdeps/ieee754/dbl-64/e_sqrt.c | 6 ++
> sysdeps/i
On 6/2/20 5:51 AM, Stefan Liebler via Libc-alpha wrote:
> #endif /* math-use-builtins.h */
> Please also update the current architecture specific math-use-builtins.h
> file: sysdeps/s390/fpu/math-use-builtins.h
> Otherwise it will break build on s390x.
Done.
>> diff --git a/sysdeps/ieee754/dbl-6
On 6/2/20 5:51 AM, Stefan Liebler via Libc-alpha wrote:
> On 6/2/20 2:35 AM, Vineet Gupta via Libc-alpha wrote:
>> 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|
20 matches
Mail list logo