Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-06-05 Thread Adhemerval Zanella
On 05/06/2020 01:44, Vineet Gupta wrote: > On 5/29/20 4:50 PM, Vineet Gupta via Libc-alpha wrote: Although this code follow other architectures, I think it woudl be better to move forward a macro that emulates function calls and use proper static inline function instead for _FPU_*

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-06-04 Thread Vineet Gupta
On 5/29/20 4:50 PM, Vineet Gupta via Libc-alpha wrote: >>> Although this code follow other architectures, I think it woudl be better >>> to move forward a macro that emulates function calls and use proper >>> static inline function instead for _FPU_* (as for get-rounding-mode.h). >> OK. do you have

Re: static inline math functions (was Re: [PATCH v6 06/13] ARC: hardware floating point support)

2020-06-02 Thread Adhemerval Zanella
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

Re: static inline math functions (was Re: [PATCH v6 06/13] ARC: hardware floating point support)

2020-06-02 Thread Joseph Myers
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

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-06-02 Thread Joseph Myers
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

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-06-02 Thread Joseph Myers
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

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-05-29 Thread Vineet Gupta
On 5/29/20 3:28 PM, Vineet Gupta via Libc-alpha wrote: >>> +/* Macros for accessing the hardware control word. */ >>> +# define _FPU_GETCW(cw) __asm__ volatile ("lr %0, [0x300]" : "=r" (cw)) >>> +# define _FPU_SETCW(cw) __asm__ volatile ("sr %0, [0x300]" : : "r" (cw)) >>> + >>> +/* Macros for a

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-05-29 Thread Vineet Gupta
On 5/29/20 7:12 AM, Adhemerval Zanella wrote: > > > On 22/04/2020 22:41, Vineet Gupta via Libc-alpha wrote: >> Signed-off-by: Vineet Gupta >> diff --git a/sysdeps/arc/fpu/e_sqrt.c b/sysdeps/arc/fpu/e_sqrt.c >> + >> +#include >> +#include >> + >> +double >> +__ieee754_sqrt (double d) >> +{ >>

Re: [PATCH v6 06/13] ARC: hardware floating point support

2020-05-29 Thread Adhemerval Zanella
On 22/04/2020 22:41, Vineet Gupta via Libc-alpha wrote: > Signed-off-by: Vineet Gupta As prior patch we do not use DCO, but rather copyright assignment. Some comments below. > --- > sysdeps/arc/fpu/e_sqrt.c| 27 > sysdeps/arc/fpu/e_sqrtf.c | 27 > sysdeps/a

[PATCH v6 06/13] ARC: hardware floating point support

2020-04-22 Thread Vineet Gupta
Signed-off-by: Vineet Gupta --- sysdeps/arc/fpu/e_sqrt.c| 27 sysdeps/arc/fpu/e_sqrtf.c | 27 sysdeps/arc/fpu/fclrexcpt.c | 36 +++ sysdeps/arc/fpu/fegetenv.c | 37 +++ sysdeps/arc/fpu/fegetmode.c | 31 ++ sysdeps/arc/fpu/f