[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions |
Date: |
Fri, 25 Oct 2013 18:20:28 +0100 |
On 25 October 2013 17:25, Tom Musta <address@hidden> wrote:
> On 10/24/2013 3:38 PM, Richard Henderson wrote:
>> You want to be using tp##muladd instead of widening to 128 bits.
>
>
> 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.
You could add the flag to the softfloat code -- this is what I did
for the somewhat ARM specific float_flag_output_denormal.
> 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 suspect it just predates the provision of fused multiply-add at
the softfloat level. It should ideally be rewritten to use the
softfloat functions.
Are you sure that doing the arithmetic with the softfloat 128 bit
float operations doesn't set the inexact flag anywhere it
shouldn't? (ie where the intermediate product is not exact in
128 bit format but the final result is exact in 64 or 32 bits).
-- PMM
- Re: [Qemu-devel] [PATCH 11/19] Add VSX ISA2.06 xtdiv Instructions, (continued)
- [Qemu-devel] [PATCH 12/19] Add VSX ISA2.06 xtsqrt Instructions, Tom Musta, 2013/10/24
- [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Tom Musta, 2013/10/24
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Richard Henderson, 2013/10/24
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Tom Musta, 2013/10/25
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Tom Musta, 2013/10/25
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Richard Henderson, 2013/10/25
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Tom Musta, 2013/10/25
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Richard Henderson, 2013/10/25
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions, Richard Henderson, 2013/10/25
[Qemu-devel] [PATCH 14/19] Add VSX xscmp*dp Instructions, Tom Musta, 2013/10/24
[Qemu-devel] [PATCH 15/19] Add VSX xmax/xmin Instructions, Tom Musta, 2013/10/24
Re: [Qemu-devel] [PATCH 15/19] Add VSX xmax/xmin Instructions, Peter Maydell, 2013/10/24