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_* (as for get-rounding-mode.h). >>> OK. do you have a preference for names, existing upper case names OK ? >> Something like below ? >> >> +# define _FPU_FPSR_FWE 0x80000000 >> + >> -# define _FPU_GETCW(cw) __asm__ volatile ("lr %0, [0x300]" : "=r" (cw)) >> -# define _FPU_SETCW(cw) __asm__ volatile ("sr %0, [0x300]" : : "r" (cw)) >> +static inline unsigned int arc_fpu_getcw(void) >> +{ >> + unsigned int cw; >> + __asm__ volatile ("lr %0, [0x300]" : "=r" (cw)); >> + return cw; >> +} >> + >> +static inline void arc_fpu_setcw(unsigned int cw) >> +{ >> + __asm__ volatile ("sr %0, [0x300]" : : "r" (cw)); >> +} > > It seems there is more discussiosn to be had here. Can we just punt on this > specific item and keep the status quo macros please. We are heading towards july > and I'd rather have the port go in this cycle ! I don't have a strong opinion here, it was more a suggestion. It seems to follow other architectures, although at least alpha does not provide the _FPU_GETCW macro. Another option would to just move this definition to an internal header as well. _______________________________________________ linux-snps-arc mailing list linux-snps-arc@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/linux-snps-arc