Ludovic Drolez a écrit : > I've also found the buggy SSE instruction by tracing modf() with gdb. > It's similar to the MMX bug found below: only the 32 bits part of the > register > is stored instead of the whole 64 bits. > > The bug is in the movd instruction in 64 bits emulation. > Under gdb, just before the movd I had %rsi=0x3FF0000000000000 > and, after movd, %xmm0=0 ! Only the 32bits part seems to be copied when > the source is a 64bits register. > > 2edaa: 48 d3 e0 shl %cl,%rax > 2edad: 48 21 c6 and %rax,%rsi > 2edb0: 66 48 0f 6e c6 movd %rsi,%xmm0 > > So in fact the valgrind mmx bug and the modf() bug have the same cause. >
I have just looked at the documentation from AMD. I confirm that in 32-bit mode, the 32 bits of the register have to be copied in the lower part of mmx or xmm register. In 64-bit mode, the 64 bits of the register have to be copied in the mmx register or in the lower part of the xmm register. So that confirms the implementation in QEMU is wrong. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel