Re: [PATCH] Fix abs.[sd] and neg.[sd] emulation for NaN operands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 10 May 2010 11:37:10 -0700, Chris Dearman <chris@xxxxxxxx> wrote:
> >>  	if (xc == IEEE754_CLASS_SNAN) {
> >> -		SETCX(IEEE754_INVALID_OPERATION);
> >> -		return ieee754dp_nanxcpt(ieee754dp_indef(), "neg");
> >> +		return ieee754dp_nanxcpt(ieee754dp_indef(), "abs");
> >>  	}
...
> ieee754dp/sp_nanxcpt also sets the invalid exception bit so I think this 
> is duplicated code. I think the same fix should have been applied to 
> ieee754sp_neg/ieee754dp_neg for consistency.

ieee754d/sp_nanxcpt will set the invalid exception bit if its first
argument was a signaling NaN.  And ieee754dp/sp_indef() is a quiet
NaN.

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux