Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnyZN-0000rD-BD for qemu-devel@nongnu.org; Sat, 06 Mar 2010 13:17:45 -0500 Received: from [199.232.76.173] (port=55893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnyZM-0000qD-OW for qemu-devel@nongnu.org; Sat, 06 Mar 2010 13:17:44 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NnyZK-0002ab-WA for qemu-devel@nongnu.org; Sat, 06 Mar 2010 13:17:44 -0500 Received: from hall.aurel32.net ([88.191.82.174]:37542) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NnyZK-0002aC-Fu for qemu-devel@nongnu.org; Sat, 06 Mar 2010 13:17:42 -0500 Date: Sat, 6 Mar 2010 19:17:33 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] qustion about x86 sse insn "lddqu" Message-ID: <20100306181733.GA14275@volta.aurel32.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hui Zhu Cc: qemu-devel@nongnu.org On Thu, Dec 03, 2009 at 01:29:23PM +0800, Hui Zhu wrote: > Hi, > > In qemu 0.11.0, it handle lddqu as: > case 0x3f0: /* lddqu */ > if (mod == 3) > goto illegal_op; > gen_lea_modrm(s, modrm, ®_addr, &offset_addr); > gen_sto_env_A0(s->mem_index, offsetof(CPUX86State,xmm_regs[reg])); > break; > It st the value of xmm[reg] to address A0, right? > > But in intel doc about this insn: > LDDQU—Load Unaligned Integer 128 Bits > The instruction is functionally similar to MOVDQU xmm, m128 for loading from > memory. That is: 16 bytes of data starting at an address specified by the source > memory operand (second operand) are fetched from memory and placed in > a destination > register (first operand). The source operand need not be aligned on a 16-byte > boundary. Up to 32 bytes may be loaded from memory; this is implementation > dependent. > > Did I miss something? Or this code have some bug? > The patch is indeed wrong, I have just committed a patch to fix the problem. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net