[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-ppc: Add quad precision muladd instructi
Bharata B Rao
Re: [Qemu-devel] [PATCH] target-ppc: Add quad precision muladd instructions
Thu, 16 Feb 2017 08:11:26 +0530
On Thu, Feb 16, 2017 at 09:13:31AM +1100, Richard Henderson wrote:
> On 02/15/2017 05:37 PM, Bharata B Rao wrote:
> > + *
> > + * TODO: When float128_muladd() becomes available, switch this
> > + * implementation to use that instead of separate float128_mul()
> > + * followed by float128_add().
> Let's just do that, rather than add something that can't pass tests.
> You should be able to copy float64_muladd and, for the most part, s/128/256/
> and s/64/128/. Other of the magic numbers, like the implicit bit and the
> exponent bias, you get from float128_mul.
I started like that but got lost somewhere down that path...
It needs at least the following new functions to be implemented:
It all looked doable, but the magic numbers used around the code that
does eventual multiplication looked difficult to understand and I couldn't
deduce that from float128_mul. For some reason float128_mul implements
multipliction via multiplication and addition (mul128To256 & add128). There
is no equivalent to this in float64_muladd.
Let me make another attempt at this.