From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBNwj-0004HI-Cq for qemu-devel@nongnu.org; Wed, 14 Jan 2015 08:25:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBNwe-000628-TO for qemu-devel@nongnu.org; Wed, 14 Jan 2015 08:25:17 -0500 Message-ID: <54B66E29.6010304@redhat.com> Date: Wed, 14 Jan 2015 14:24:57 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1420652355-31847-1-git-send-email-pbonzini@redhat.com> <1420652355-31847-2-git-send-email-pbonzini@redhat.com> <20150113184830.GE31510@thinpad.lan.raisama.net> <54B576BF.80409@redhat.com> <20150114131743.GF31510@thinpad.lan.raisama.net> In-Reply-To: <20150114131743.GF31510@thinpad.lan.raisama.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/4] target-i386: fix movntsd on big-endian hosts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org 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