caiyinyu
aeee41f1cf
LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf
2024-03-12 14:07:27 +08:00
Paul Eggert
dff8da6b3e
Update copyright dates with scripts/update-copyrights
2024-01-01 10:53:40 -08:00
Paul Pluzhnikov
65cc53fe7c
Fix misspellings in sysdeps/ -- BZ 25337
2023-05-30 23:02:29 +00:00
caiyinyu
90233f113c
LoongArch: Add get_rounding_mode.
2023-03-13 09:20:42 +08:00
Xi Ruoyao
aa4b45a346
LoongArch: Add math-barriers.h
...
This patch implements the LoongArch specific math barriers in order to omit
the store and load from stack if possible.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2023-02-27 08:18:49 -03:00
Joseph Myers
6d7e8eda9b
Update copyright dates with scripts/update-copyrights
2023-01-06 21:14:39 +00:00
Xiaolin Tang
885d340f20
LoongArch: Add support for ilogb[f]
...
Add inline assembler for the ilogb functions. Passes GLIBC regression.
2022-11-29 16:00:29 +08:00
Xiaolin Tang
d3366b6b87
LoongArch: Add support for scalb[f]
...
Add inline assembler for the scalb functions. Passes GLIBC regression.
2022-11-29 16:00:29 +08:00
Xiaolin Tang
e3d9ca4e94
LoongArch: Add support for scalbn[f]
...
Add inline assembler for the scalbn functions. Passes GLIBC regression.
GCC 13, LoongArch support ___builtin_scalbn{,f} with -fno-math-errno,
but only "libm" can use -fno-math-errno in GLIBC, and scalbn is in libc
instead of libm because __printf_fp calls it.
2022-11-29 16:00:29 +08:00
Xiaolin Tang
13c549f497
LoongArch: Use __builtin_logb{,f} with GCC >= 13
...
GCC 13 compiles these built-ins instead of generic
implementation for function logb.
Link: https://gcc.gnu.org/r13-3922
Co-Authored-By: Xi Ruoyao <xry111@xry111.site>
2022-11-29 16:00:28 +08:00
Xiaolin Tang
f711e4ef53
LoongArch: Use __builtin_llrint{,f} with GCC >= 13
...
GCC 13 compiles these built-ins instead of generic
implementation for function llrint.
Link: https://gcc.gnu.org/r13-3920
Co-Authored-By: Xi Ruoyao <xry111@xry111.site>
2022-11-29 16:00:28 +08:00
Xiaolin Tang
e1697a540c
LoongArch: Use __builtin_lrint{,f} with GCC >= 13
...
GCC 13 compiles these built-ins instead of generic
implementation for function lrint.
Link: https://gcc.gnu.org/r13-3920
Co-Authored-By: Xi Ruoyao <xry111@xry111.site>
2022-11-29 16:00:28 +08:00
Xi Ruoyao
948652e4f8
LoongArch: Use __builtin_rint{,f} with GCC >= 13
...
GCC 13 compiles these built-ins to frint.{d,s} instruction.
Link: https://gcc.gnu.org/r13-3919
2022-11-29 16:00:28 +08:00
Xiaolin Tang
838b0da96a
LoongArch: Hard Float Support for fmaximum_mag_num{f/ }, fminimum_mag_num{f/ }.
...
Use hardware Floating-point instruction f{maxa/mina}.{s/d}, fclass.{s/d}
to implement fmaximum_mag_num{f/ }, fminimum_mag_num{f/ }.
* sysdeps/loongarch/fpu/s_fmaximum_mag_num.c: New file.
* sysdeps/loongarch/fpu/s_fmaximum_mag_numf.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimum_mag_num.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimum_mag_numf.c: Likewise.
2022-11-14 10:02:42 +08:00
Xiaolin Tang
a10f9fb3ff
LoongArch: Hard Float Support for fmaximum_mag{f/ }, fminimum_mag{f/ }.
...
Use hardware Floating-point instruction f{maxa/mina}.{s/d}, fclass.{s/d}
to implement fmaximum_mag{f/ }, fminimum_mag{f/ }.
* sysdeps/loongarch/fpu/s_fmaximum_mag.c: New file.
* sysdeps/loongarch/fpu/s_fmaximum_magf.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimum_mag.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimum_magf.c: Likewise.
2022-11-14 10:02:42 +08:00
Xiaolin Tang
73e35174f5
LoongArch: Hard Float Support for fmaxmag{f/ }, fminmag{f/ }.
...
Use hardware Floating-point instruction f{maxa/mina}.{s/d},
to implement fmaxmag{f/ }, fminmag{f/ }.
* sysdeps/loongarch/fpu/s_fmaxmag.c: New file.
* sysdeps/loongarch/fpu/s_fmaxmagf.c: Likewise.
* sysdeps/loongarch/fpu/s_fminmag.c: Likewise.
* sysdeps/loongarch/fpu/s_fminmagf.c: Likewise.
2022-11-14 10:02:42 +08:00
Xiaolin Tang
bd61224574
LoongArch: Hard Float Support for fmaximum_num{f/ }, fminimum_num{f/ }.
...
Use hardware Floating-point instruction f{max/min}.{s/d}, fclass.{s/d}
to implement fmaximum_num{f/ }, fminimum_num{f/ }.
* sysdeps/loongarch/fpu/s_fmaximum_num.c: New file.
* sysdeps/loongarch/fpu/s_fmaximum_numf.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimum_num.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimum_numf.c: Likewise.
2022-11-14 10:02:42 +08:00
Xiaolin Tang
1ed6c7ab2e
LoongArch: Hard Float Support for fmaximum{f/ }, fminimum{f/ }.
...
Use hardware Floating-point instruction f{max/min}.{s/d}, fclass.{s/d}
to implement fmaximum{f/ }, fminimum{f/ }.
* sysdeps/loongarch/fpu/s_fmaximum.c: New file.
* sysdeps/loongarch/fpu/s_fmaximumf.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimum.c: Likewise.
* sysdeps/loongarch/fpu/s_fminimumf.c: Likewise.
2022-11-14 10:02:42 +08:00
Xiaolin Tang
5fe2647d31
LoongArch: Hard Float Support for float-point classification functions.
...
Use hardware Floating-point instruction fclass.{s/d} to implement
classification functions, i.e finite{f/ }, fpclassify{f/ }, isnan{f/ },
isinf{f/ }, issignaling{f/ }.
* sysdeps/loongarch/fpu/s_finite.c: New file.
* sysdeps/loongarch/fpu/s_finitef.c: Likewise.
* sysdeps/loongarch/fpu/s_fpclassify.c: Likewise.
* sysdeps/loongarch/fpu/s_fpclassifyf.c: Likewise.
* sysdeps/loongarch/fpu/s_isinf.c: Likewise.
* sysdeps/loongarch/fpu/s_isinff.c: Likewise.
* sysdeps/loongarch/fpu/s_isnan.c: Likewise.
* sysdeps/loongarch/fpu/s_isnanf.c: Likewise.
* sysdeps/loongarch/fpu/s_issignaling.c: Likewise.
* sysdeps/loongarch/fpu/s_issignalingf.c: Likewise.
* sysdeps/loongarch/fpu_control.h: Add _FCLASS_* macro.
2022-11-14 10:02:41 +08:00
Xiaolin Tang
56da6a073d
LoongArch: Use __builtin_{fma, fmaf} to implement function {fma, fmaf}.
...
Use __builtin_{fma, fmaf} to implement function {fma, fmaf} instead of
the generic implementation.
* sysdeps/loongarch/fpu/math-use-builtins-fma.h: New file.
2022-11-14 10:02:41 +08:00
Xi Ruoyao
241603123c
LoongArch: Use __builtin_{fmax,fmaxf,fmin,fminf} with GCC >= 13
...
GCC 13 compiles these built-ins to {fmax,fmin}.{s/d} instruction, use
them instead of the generic implementation.
Link: https://gcc.gnu.org/r13-2085
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2022-08-30 11:59:15 +08:00
caiyinyu
68d61026d5
LoongArch: Hard Float Support
2022-07-26 12:35:12 -03:00