Re: [PATCH v5 06/14] ARC: hardware floating point support

2020-04-20 Thread Joseph Myers
On Fri, 17 Apr 2020, Vineet Gupta via Libc-alpha wrote: > > My suggestion would be to define the > > macro (using do { ... } while (0)) to copy the argument to a temporary > > variable, and do the bit-set operation in C code on that temporary > > variable rather than as part of the asm. > >

Re: [PATCH v5 06/14] ARC: hardware floating point support

2020-04-17 Thread Vineet Gupta
On 4/17/20 3:59 PM, Joseph Myers wrote: > On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > >> +# define _FPU_SETS(cw) __asm__ volatile ("bset %0, %0, 31 \r\n" \ >> + "sr %0, [0x301] \r\n" \ >> + : : "r"

Re: [PATCH v5 06/14] ARC: hardware floating point support

2020-04-17 Thread Joseph Myers
On Wed, 8 Apr 2020, Vineet Gupta via Libc-alpha wrote: > +# define _FPU_SETS(cw) __asm__ volatile ("bset %0, %0, 31 \r\n" \ > + "sr %0, [0x301] \r\n" \ > + : : "r" (cw)) This asm doesn't look safe; it's

[PATCH v5 06/14] ARC: hardware floating point support

2020-04-08 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 ++