[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: malc
Subject: Re: [Qemu-devel] cvttps2dq, movdq2q, movq2dq incorrect behaviour
Date: Tue, 20 Jun 2006 18:26:50 +0400 (MSD)

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 garbage-in-memory (or regs, or somewhere)
problem.  Reason is that the wrong results kept changing as I cut
the full test program down to just the small one I posted.  Can you
try on a vanilla build of i386-softmmu from cvs?

soft-float was a red herring, translate.c is at fault here (interpreter
does not use it, hence behaved correctly)

if (b1 >= 2 && ((b >= 0x50 && b <= 0x5f) ||
                b == 0xc2)) {
    /* specific case for SSE single instructions */
    if (b1 == 2) {
        /* 32 bit access */
        gen_op_ld_T0_A0[OT_LONG + s->mem_index]();
    } else {
        /* 64 bit access */
        gen_ldq_env_A0[s->mem_index >> 
} else {
    gen_ldo_env_A0[s->mem_index >> 2](op2_offset);

cvttps2dq is 0x5b(b=0x5b) with repn prefix (b1=2) the above code is optimized
a bit more than it should have been, as it loads only 4 bytes into xmm_t0
instead of 16.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]