[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add I
From: |
Richard Henderson |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions |
Date: |
Fri, 25 Oct 2013 09:42:57 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
On 10/25/2013 09:25 AM, Tom Musta wrote:
>
> I tried recoding xsmaddadp using float64_muladd. The problem that I hit is
> the
> boundary case where the intermediate product and the summand are infinities of
> the opposite sign. This is the case handled by the first "if" in the code
> snippet above. PowerPC has a dedicated FPSCR bit for this type of condition
> (VXISI) as well as a general invalid operation bit (VX). As far as I can
> tell,
> the softfloat code only has the equivalent of the VX bit. Thus the
> implementation
> that I proposed is a more accurate representation of the Power ISA.
>
> The VSX code was modeled after the existing fmadd FPU instruction. I suspect
> the author of that code wrote it this way for similar reasons.
>
> I am inclined to keep my proposed implementation, which is consistent with
> the existing PowerPC code.
>
> Thoughts?
Hmm. I won't object to your current implementation, since it does produce
correct results.
I believe that a better implementation could use float*_muladd, and check the
result for float_flag_invalid. If set, compute the intermediate product so you
can figure out the VXISI setting. But we'd expect that to be an unlikely path.
r~
- [Qemu-ppc] [PATCH 10/19] Add VSX ISA2.06 xrsqrte Instructions, (continued)
- [Qemu-ppc] [PATCH 10/19] Add VSX ISA2.06 xrsqrte Instructions, Tom Musta, 2013/10/24
- [Qemu-ppc] [PATCH 11/19] Add VSX ISA2.06 xtdiv Instructions, Tom Musta, 2013/10/24
- [Qemu-ppc] [PATCH 12/19] Add VSX ISA2.06 xtsqrt Instructions, Tom Musta, 2013/10/24
- [Qemu-ppc] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Tom Musta, 2013/10/24
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Peter Maydell, 2013/10/25
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Richard Henderson, 2013/10/25
[Qemu-ppc] [PATCH 14/19] Add VSX xscmp*dp Instructions, Tom Musta, 2013/10/24
[Qemu-ppc] [PATCH 15/19] Add VSX xmax/xmin Instructions, Tom Musta, 2013/10/24