[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 17/19] target-ppc: fix SPE comparison functions

From: Nathan Froyd
Subject: Re: [Qemu-devel] [PATCH 17/19] target-ppc: fix SPE comparison functions
Date: Tue, 12 Apr 2011 19:40:33 -0700
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

On Tue, Apr 12, 2011 at 11:59:29PM +0200, Aurelien Jarno wrote:
> Given that float32_*() functions are IEEE754 compliant, the efscmp*()
> functions are correctly implemented, while efstst*() are not. This
> patch reverse the implementation of this two groups of functions and
> fix the comments. It also use float32_eq() instead of float32_eq_quiet()
> as qNaNs should not be ignored.

Thanks for addressing this; the E500 emulation in QEMU is more like how
we wish the hardware acted, rather than how it actually acts. :)

It's late here, but I think this change:

> -static inline uint32_t efscmplt(uint32_t op1, uint32_t op2)
> +static inline uint32_t efststlt(uint32_t op1, uint32_t op2)
>  {
> -    /* XXX: TODO: test special values (NaN, infinites, ...) */
> +    /* XXX: TODO: ignore special values (NaN, infinites, ...) */
>      return efststlt(op1, op2);
>  }

is not correct, as you've just turned this into an infinite (inlined!)
loop.  You'd want to change the efststlt call into an efscmplt call.
Similarly for efstst{gt,eq}.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]