On 14/01/2015 14:17, Eduardo Habkost wrote:
>>> > > Do we have (or will patch 4/4 introduce) the same bug on the
>>> > > tcg_gen_addi_ptr() calls that don't use the XMM_Q macro?
>> > 
>> > No, they all call into helpers that use the XMM_Q macro themselves.
> tcg_gen_addi_ptr() is called sometimes using the fpregs[reg].mmx offset,
> and sometimes using the xmm_regs[reg] offset. How can it know if the
> XMM_Q macro is necessary or not?

It can't, but I audited the calls.

Note that one helper is foo_xmm, the other is foo_mmx:

                tcg_gen_addi_ptr(cpu_ptr0, cpu_env, 
offsetof(CPUX86State,xmm_regs[rm]));
                gen_helper_pmovmskb_xmm(cpu_tmp2_i32, cpu_env, cpu_ptr0);
            } else {
                rm = (modrm & 7);
                tcg_gen_addi_ptr(cpu_ptr0, cpu_env, 
offsetof(CPUX86State,fpregs[rm].mmx));
                gen_helper_pmovmskb_mmx(cpu_tmp2_i32, cpu_env, cpu_ptr0);

Paolo

Reply via email to