This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [09/12] Add fesetexcept: powerpc



On 08/12/2016 11:30 AM, Joseph Myers wrote:
> On Fri, 12 Aug 2016, Paul E. Murphy wrote:
> 
>>> +  n.l = (u.l
>>> +	 | (excepts & FPSCR_STICKY_BITS)
>>> +	 | (excepts >> ((31 - FPSCR_VX) - (31 - FPSCR_VXSOFT))
>>> +	    & FE_INVALID_SOFTWARE));
>>
>> This should also preserve a comment about transforming
>> FE_INVALID into FE_INVALID_SOFTWARE.  Otherwise, this patch
>> looks OK to me.
> 
> I don't see such a comment in sysdeps/powerpc/fpu/fsetexcptflg.c to 
> preserve (all these function implementations follow those of 
> fesetexceptflag).  I did preserve the comment "Deal with 
> FE_INVALID_SOFTWARE not being implemented on some chips." (while trying 
> not to duplicate all the completely routine comments in various 
> fesetexceptflag implementations that say no more than repeating the plain 
> semantics of individual lines of C code).
> 

I don't like the naked constants.  I am not faulting the patch for them.
But in trying to understand them, I had to do some digging.  A similar
snippet shows up in three places in ppc code.  fpu/fraiseexcpt.c
seems to contain the only useful comment.  Both clear and succinct.
It would be nice to clean up the usage, but such should be done in a
separate patch, and needn't by you.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]