On 30 January 2017 at 18:16, Laurent Vivier <laur...@vivier.eu> wrote: > According to the comment, this definition of invalid encoding is given > by intel developer's manual, and doesn't work with the behavior > of 680x0 FPU. > > Signed-off-by: Laurent Vivier <laur...@vivier.eu>
Part of the reason these checks are here is that the code behind them doesn't always cope nicely with the invalid encodings. https://lists.nongnu.org/archive/html/qemu-devel/2016-08/msg01991.html has an x86 test case for certain sqrt inputs that cause the floatx80_sqrt() function to go into an infinite loop, for instance. I guess we need to look more carefully at exactly what the m68k does for these encodings (maybe have a 'normalize value' function which squashes them down to whatever the equivalent non-weird encoding is?). thanks -- PMM