Re: [Qemu-devel] [PATCH 1/2] fpu: Check for inf/x before x/0

2018-04-17 Thread Peter Maydell
On 17 April 2018 at 03:53, Richard Henderson wrote: > The re-factoring of div_floats changed the order of checking meaning > an operation like -inf/0 erroneously raises the divbyzero flag. > IEEE-754 (2008) specifies this should only occur for operations > on finite

[Qemu-devel] [PATCH 1/2] fpu: Check for inf/x before x/0

2018-04-16 Thread Richard Henderson
The re-factoring of div_floats changed the order of checking meaning an operation like -inf/0 erroneously raises the divbyzero flag. IEEE-754 (2008) specifies this should only occur for operations on finite operands. We fix this by moving the check on the dividend being Inf/0 to before the