On 03/13/2018 04:27 AM, Laurent Vivier wrote: > I have compared results of these instructions from a real m68040 and from > QEMU, and they match (sincos differs [1] because in QEMU we compute it as > sin and cos, and on m68040 sin and cos results differ also with > sincos results. It looks like a rounding problem, perhaps a bug in m68040 > FPU? or in my test program?) > > I know this will need more work, but for the moment I only would > like to provide these new instructions to the maintream of QEMU. > > [1] Example: > > sincos -6.125952 -> (0.156586, 0.987664) > > QEMU: > > sincos c0010000c407cd1182c2bb27 -> 3ffc0000a05812beea449a4d > 3ffe0000fcd791d65887d19a > sin c0010000c407cd1182c2bb27 -> 3ffc0000a05812beea449a4d > cos c0010000c407cd1182c2bb27 -> 3ffe0000fcd791d65887d19a > > m68040: > > sincos c0010000c407cd1182c2bb27 -> 3ffc0000a05812beea449a4d > 3ffe0000fcd791d65887d199 <<-- > sin c0010000c407cd1182c2bb27 -> 3ffc0000a05812beea449a4d > cos c0010000c407cd1182c2bb27 -> 3ffe0000fcd791d65887d19a
Wow, this does seem like a processor bug. Anyway, I've looked through the patch set and nothing stands out, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~