[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/2] target-arm: A64: Implement remaining 3-s
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/2] target-arm: A64: Implement remaining 3-same instructions |
Date: |
Tue, 11 Feb 2014 15:55:36 +0000 |
On 11 February 2014 15:40, Richard Henderson <address@hidden> wrote:
> On 02/11/2014 05:51 AM, Peter Maydell wrote:
>> @@ -2376,7 +2376,7 @@ float32 float32_muladd(float32 a, float32 b, float32
>> c, int flags STATUS_PARAM)
>> if (cExp == 0) {
>> normalizeFloat32Subnormal(cSig, &cExp, &cSig);
>> }
>> - cExp--;
>> + cExp -= 2;
>> cSig = (cSig | 0x00800000) << 7;
>> return roundAndPackFloat32(cSign ^ signflip, cExp, cSig
>> STATUS_VAR);
>> }
>> @@ -4107,7 +4107,7 @@ float64 float64_muladd(float64 a, float64 b, float64
>> c, int flags STATUS_PARAM)
>> if (cExp == 0) {
>> normalizeFloat64Subnormal(cSig, &cExp, &cSig);
>> }
>> - cExp--;
>> + cExp -= 2;
>> cSig = (cSig | 0x0010000000000000ULL) << 10;
>> return roundAndPackFloat64(cSign ^ signflip, cExp, cSig
>> STATUS_VAR);
>> }
>
> This should obviously be folded into the previous patch.
>
> Probably with a comment reminding about roundAndPackFloat wanting an
> off-by-one
> exponent.
>
> Otherwise both get
>
> Reviewed-by: Richard Henderson <address@hidden>
Doh; thanks for the catch. Yeah, I was halfway to putting
in a comment about why we were subtracting two, should have
followed my first instinct.
Will make trivial fixups and put into target-arm.next.
(comment text: /* Subtract one to halve and one again because
roundAndPackFloat wants one less than the true exponent. */)
thanks
-- PMM