[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normali
From: |
Peter Maydell |
Subject: |
Re: [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs |
Date: |
Fri, 27 Mar 2020 22:33:02 +0000 |
On Fri, 27 Mar 2020 at 22:27, Richard Henderson
<address@hidden> wrote:
> I wonder if I have the energy to petition the committee to drop, for C202? all
> of the "undefined" nonsense that only applies to sign-magnitute and
> ones-compliment computers, which haven't been seen since the 70's...
There was certainly a proposal to do that (I think from a Google
engineer) for C++, I forget whether the equivalent C change has
also been proposed.
> > That said, is it valid for this function to be called with a zero
> > aSig value ? I think all these normalizeFloat*Subnormal() functions
> > assume non-zero sig input, and the only callsite where it's not clearly
> > obvious that this is obvious that the sig input is non-zero is the call to
> > normalizeFloatx80Subnormal() from addFloatx80Sigs(). So perhaps we
> > just need to check and fix that callsite ??
>
> You're right -- addFloatx80Sigs is the only use out of 26 that doesn't have a
> preceding check for 0.
Mmm. My vote is for fixing addFloatx80Sigs -- now we just need
to figure out what the desired behaviour is.
thanks
-- PMM
- Re: [PATCH v1 3/7] tests/tcg: remove extraneous pasting macros, (continued)
- [PATCH v1 2/7] linux-user: protect fcntl64 with an #ifdef, Alex Bennée, 2020/03/27
- [PATCH v1 4/7] linux-user: more debug for init_guest_space, Alex Bennée, 2020/03/27
- [PATCH v1 6/7] target/xtensa: add FIXME for translation memory leak, Alex Bennée, 2020/03/27
- [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs, Alex Bennée, 2020/03/27
- Re: [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs, Aleksandar Markovic, 2020/03/27
- [PATCH v1 7/7] gdbstub: fix compiler complaining, Alex Bennée, 2020/03/27
- Re: [PATCH for 5.0 v1 0/7] A selection of sanitiser fixes, no-reply, 2020/03/27