linux-mips
[Top] [All Lists]

[PATCH] Restore signalling NaN behaviour for abs.[sd]

To: linux-mips@linux-mips.org
Subject: [PATCH] Restore signalling NaN behaviour for abs.[sd]
From: Chris Dearman <chris@mips.com>
Date: Tue, 11 May 2010 18:30:34 -0700
In-reply-to: <20100512.004512.39157093.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20100512.004512.39157093.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: StGIT/0.14.2
Atsushi Nemoto <anemo@mba.ocn.ne.jp> spotted that this had been
incorrectly removed in a previous patch

Signed-off-by: Chris Dearman <chris@mips.com>
---

 arch/mips/math-emu/dp_simple.c |    1 +
 arch/mips/math-emu/sp_simple.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/mips/math-emu/dp_simple.c b/arch/mips/math-emu/dp_simple.c
index d9ae1db..b909742 100644
--- a/arch/mips/math-emu/dp_simple.c
+++ b/arch/mips/math-emu/dp_simple.c
@@ -78,6 +78,7 @@ ieee754dp ieee754dp_abs(ieee754dp x)
        DPSIGN(x) = 0;
 
        if (xc == IEEE754_CLASS_SNAN) {
+               SETCX(IEEE754_INVALID_OPERATION);
                return ieee754dp_nanxcpt(ieee754dp_indef(), "abs");
        }
 
diff --git a/arch/mips/math-emu/sp_simple.c b/arch/mips/math-emu/sp_simple.c
index 3175477..2fd53c9 100644
--- a/arch/mips/math-emu/sp_simple.c
+++ b/arch/mips/math-emu/sp_simple.c
@@ -78,6 +78,7 @@ ieee754sp ieee754sp_abs(ieee754sp x)
        SPSIGN(x) = 0;
 
        if (xc == IEEE754_CLASS_SNAN) {
+               SETCX(IEEE754_INVALID_OPERATION);
                return ieee754sp_nanxcpt(ieee754sp_indef(), "abs");
        }
 


<Prev in Thread] Current Thread [Next in Thread>