Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-21 Thread malc
On Wed, 21 Jun 2006, Julian Seward wrote: Malc, your sse-movq.patch works for me. Thanks. soft-float was a red herring, translate.c is at fault here (interpreter does not use it, hence behaved correctly) translate.c:3009 if (b1 = 2 ((b = 0x50 b = 0x5f) || b == 0xc2)) {

Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-21 Thread malc
On Wed, 21 Jun 2006, malc wrote: On Wed, 21 Jun 2006, Julian Seward wrote: Malc, your sse-movq.patch works for me. Thanks. soft-float was a red herring, translate.c is at fault here (interpreter does not use it, hence behaved correctly) [..snip..] cvttps2dq is 0x5b(b=0x5b) with repn

Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-21 Thread Julian Seward
It appears that cvttps2dq is indeed the only exception in the range, combined patch that fixes both movd?q2d?q and cvttps2dq is attached. I don't have any kind of SSE on this machine so would apprecaite if someone would run tests/test-i386 with the patch attached. That works for me.

[Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Julian Seward
The SSE2 instructions cvttps2dq, movdq2q, movq2dq do not behave correctly, as shown by the attached program. It should print cvttps2dq_1 ... ok cvttps2dq_2 ... ok movdq2q_1 ... ok movq2dq_1 ... ok but instead produces cvttps2dq_1 ... ok cvttps2dq_2 ... not ok result0.sd[0] =

Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread malc
On Tue, 20 Jun 2006, Julian Seward wrote: The SSE2 instructions cvttps2dq, movdq2q, movq2dq do not behave correctly, as shown by the attached program. It should print cvttps2dq_1 ... ok cvttps2dq_2 ... ok movdq2q_1 ... ok movq2dq_1 ... ok but instead produces cvttps2dq_1 ... ok

Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Julian Seward
On Tuesday 20 June 2006 12:29, malc wrote: The signature of movdq2q is Pq, VRq and for movq2dq - Vo, PRq it appears that translate.c gets it backwards, attached patch should deal with it. Cool. As for cvttps2dq i ran it with interpreter which uses outdated(i.e. non soft-float) conversion

RE : [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Sylvain Petreolle
--- Julian Seward [EMAIL PROTECTED] a écrit : The SSE2 instructions cvttps2dq, movdq2q, movq2dq do not behave correctly, as shown by the attached program. It should print cvttps2dq_1 ... ok cvttps2dq_2 ... ok movdq2q_1 ... ok movq2dq_1 ... ok I tried your program on my

Re: RE : [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread malc
On Tue, 20 Jun 2006, Sylvain Petreolle wrote: --- Julian Seward [EMAIL PROTECTED] a ?crit : The SSE2 instructions cvttps2dq, movdq2q, movq2dq do not behave correctly, as shown by the attached program. It should print cvttps2dq_1 ... ok cvttps2dq_2 ... ok movdq2q_1 ... ok movq2dq_1

Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Julian Seward
[EMAIL PROTECTED] qemu]$ gcc -msse2 sse2test.c -o sse2test [EMAIL PROTECTED] qemu]$ ./sse2test cvttps2dq_1 ... failed cvttps2dq_2 ... failed movdq2q_1 ... failed movq2dq_1 ... failed what am i doing wrong here ? Running it on a CPU without SSE2, if i'm allowed to venture a gues.

Re: RE : [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Jens Axboe
On Tue, Jun 20 2006, malc wrote: On Tue, 20 Jun 2006, Sylvain Petreolle wrote: --- Julian Seward [EMAIL PROTECTED] a ?crit : The SSE2 instructions cvttps2dq, movdq2q, movq2dq do not behave correctly, as shown by the attached program. It should print cvttps2dq_1 ... ok cvttps2dq_2

Re: RE : [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Jens Axboe
On Tue, Jun 20 2006, Jens Axboe wrote: On Tue, Jun 20 2006, malc wrote: On Tue, 20 Jun 2006, Sylvain Petreolle wrote: --- Julian Seward [EMAIL PROTECTED] a ?crit : The SSE2 instructions cvttps2dq, movdq2q, movq2dq do not behave correctly, as shown by the attached program. It should

Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread malc
On Tue, 20 Jun 2006, Julian Seward wrote: As for cvttps2dq i ran it with interpreter which uses outdated(i.e. non soft-float) conversion routines and it passed, so my guess would be that this is float32_to_int32_round_to_zero vs (int32_t) cast issue. I had a feeling this is a

RE : Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Sylvain Petreolle
--- Julian Seward [EMAIL PROTECTED] a écrit : Running it on a CPU without SSE2, if i'm allowed to venture a gues. Yup. Try 'strace ./sse2test' and see if it gets SIGILLs thrown at it. J You are right, I get SIGILLs. Seems I was wrong thinking Athlon xp was able to support sse2. ---

Re: RE : Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Guillaume POIRIER
Hi, On 6/20/06, Sylvain Petreolle [EMAIL PROTECTED] wrote: --- Julian Seward [EMAIL PROTECTED] a écrit : Running it on a CPU without SSE2, if i'm allowed to venture a gues. Yup. Try 'strace ./sse2test' and see if it gets SIGILLs thrown at it. J You are right, I get SIGILLs. Seems I

Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour

2006-06-20 Thread Julian Seward
Malc, your sse-movq.patch works for me. Thanks. soft-float was a red herring, translate.c is at fault here (interpreter does not use it, hence behaved correctly) translate.c:3009 if (b1 = 2 ((b = 0x50 b = 0x5f) || b == 0xc2)) { /* specific case for SSE single