Patchwork [15/19] target-arm: fix wrong usage of floatx80_eq_quiet()

login
register
mail settings
Submitter Aurelien Jarno
Date April 12, 2011, 9:59 p.m.
Message ID <1302645571-20500-16-git-send-email-aurelien@aurel32.net>
Download mbox | patch
Permalink /patch/90920/
State New
Headers show

Comments

Aurelien Jarno - April 12, 2011, 9:59 p.m.
I haven't look at the documentation, but for the neighbouring code it looks
clear that floatx80_eq() should be used instead of floatx80_eq_quiet().

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 linux-user/arm/nwfpe/fpa11_cprt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Aurelien Jarno - April 13, 2011, 6:11 p.m.
On Tue, Apr 12, 2011 at 11:41:49PM +0100, Peter Maydell wrote:
> On 12 April 2011 22:59, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > I haven't look at the documentation, but for the neighbouring code it looks
> > clear that floatx80_eq() should be used instead of floatx80_eq_quiet().
> 
> Actually I think it's irrelevant -- PerformComparisonOperation()
> is called only once, and the code before it carefully checks for
> any NaNs and takes a different code path in that case (jumping
> to the 'unordered' label). So it doesn't matter which function
> we use here. I don't particularly object if you think using the
> non _quiet one is aesthetically tidier. (The nwfpe code is all
> hovering on the edge of total obsolescence anyhow; I certainly
> don't have any test cases for it.)
> 

Ok, I will simply drop it then.

Patch

diff --git a/linux-user/arm/nwfpe/fpa11_cprt.c b/linux-user/arm/nwfpe/fpa11_cprt.c
index 8011897..be54e95 100644
--- a/linux-user/arm/nwfpe/fpa11_cprt.c
+++ b/linux-user/arm/nwfpe/fpa11_cprt.c
@@ -159,7 +159,7 @@  PerformComparisonOperation(floatx80 Fn, floatx80 Fm)
    }
 
    /* test for equal condition */
-   if (floatx80_eq_quiet(Fn,Fm, &fpa11->fp_status))
+   if (floatx80_eq(Fn,Fm, &fpa11->fp_status))
    {
       flags |= CC_ZERO;
    }