[Qemu-devel] [PATCH v5] fpu: add mechanism to check for invalid long double formats

2016-08-16 Thread Andrew Dutcher
(for fp-typed results) or the integer indefinite value (the minimum representable signed integer value, for int-typed results). For the non-quiet comparison operations, this touches adjacent code in order to pass style checks. Signed-off-by: Andrew Dutcher <and...@andrewdutcher.com> --- Ver

Re: [Qemu-devel] [PATCH v4] fpu: add mechanism to check for invalid long double formats

2016-08-16 Thread Andrew Dutcher
cing the original first line... On Tue, Aug 16, 2016 at 3:59 PM, Andrew Dutcher <and...@andrewdutcher.com> wrote: > I explicitly left the check off the comparison operations because I > misread the NaN check as something equivalent to the check I would be > adding. I'll add it shortly. >

Re: [Qemu-devel] [PATCH v4] fpu: add mechanism to check for invalid long double formats

2016-08-16 Thread Andrew Dutcher
. Thanks, - Andrew On Tue, Aug 16, 2016 at 6:34 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 15 August 2016 at 23:27, Andrew Dutcher <and...@andrewdutcher.com> wrote: >> All operations that take a floatx80 as an operand need to have their >> inputs chec

[Qemu-devel] [PATCH v4] fpu: add mechanism to check for invalid long double formats

2016-08-15 Thread Andrew Dutcher
(for fp-typed results) or the integer indefinite value (the minimum representable signed integer value, for int-typed results). Signed-off-by: Andrew Dutcher <and...@andrewdutcher.com> --- Version 4: Remove comments, since apparently it's still 1998. If anyone wants to know what the

[Qemu-devel] [PATCH v3] fpu: add mechanism to check for invalid long double formats

2016-08-15 Thread Andrew Dutcher
(for fp-typed results) or the integer indefinite value (the minimum representable signed integer value, for int-typed results). Signed-off-by: Andrew Dutcher <and...@andrewdutcher.com> --- Version 3: Move from a control-flow macro to an explicit inline return, add check to all the conv

[Qemu-devel] [PATCH v2] fpu: add mechanism to check for invalid long double formats

2016-08-13 Thread Andrew Dutcher
Signed-off-by: Andrew Dutcher <and...@andrewdutcher.com> --- fpu/softfloat-specialize.h | 12 fpu/softfloat.c| 11 +++ include/fpu/softfloat.h| 13 + 3 files changed, 36 insertions(+) diff --git a/fpu/softfloat-specialize.h b/fpu/sof

[Qemu-devel] [PATCH] fpu: add mechanism to check for invalid long double formats

2016-08-13 Thread Andrew Dutcher
The macro require_valid_floatx80(value, status) will check for malformed extended precision encodings, and if one is found, generate an invalid-operation exception and return NaN. This check has been added to the beginning of the basic 80-bit float arithmetic functions. Signed-off-by: Andrew

Re: [Qemu-devel] Hang bug in 80-bit float square root implementation

2016-08-12 Thread Andrew Dutcher
Alright! I'll test that new patch and submit it. Thanks, - Andrew On Fri, Aug 12, 2016 at 4:01 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 10 August 2016 at 04:35, Andrew Dutcher <andrewrdutc...@gmail.com> wrote: >> Hello! >> >> I ran into

[Qemu-devel] Hang bug in 80-bit float square root implementation

2016-08-10 Thread Andrew Dutcher
Hello! I ran into an issue where qemu (specifically, the unicorn engine) would hang forever in the middle of the emulated square root instruction under certain circumstances. I eventually tracked the issue down to the square root of an "unnormal" long double, one without the integer part bit set.