|
From: <sv...@va...> - 2010-07-29 07:01:36
|
Author: sewardj
Date: 2010-07-29 08:01:29 +0100 (Thu, 29 Jul 2010)
New Revision: 1992
Log:
x86/amd64 FXTRACT: mimic the Core i5 behaviour when the argument is a
negative NaN.
Modified:
trunk/priv/guest_generic_x87.c
Modified: trunk/priv/guest_generic_x87.c
===================================================================
--- trunk/priv/guest_generic_x87.c 2010-07-29 05:13:58 UTC (rev 1991)
+++ trunk/priv/guest_generic_x87.c 2010-07-29 07:01:29 UTC (rev 1992)
@@ -453,13 +453,13 @@
const ULong bit52 = 1ULL << 52;
const ULong sigMask = bit52 - 1;
- /* Mimic PIII behaviour for special cases. */
+ /* Mimic Core i5 behaviour for special cases. */
if (arg == posInf)
return getExp ? posInf : posInf;
if (arg == negInf)
return getExp ? posInf : negInf;
if ((arg & nanMask) == nanMask)
- return qNan;
+ return qNan | (arg & (1ULL << 63));
if (arg == posZero)
return getExp ? negInf : posZero;
if (arg == negZero)
|