From patchwork Tue Mar 26 19:01:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 231523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2933B2C008D for ; Wed, 27 Mar 2013 06:18:19 +1100 (EST) Received: from localhost ([::1]:55927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZAR-0008EW-IZ for incoming@patchwork.ozlabs.org; Tue, 26 Mar 2013 15:04:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZ8D-0004tq-Cv for qemu-devel@nongnu.org; Tue, 26 Mar 2013 15:02:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKZ8A-0005sB-KL for qemu-devel@nongnu.org; Tue, 26 Mar 2013 15:02:01 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:49215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZ8A-0005oG-Ad for qemu-devel@nongnu.org; Tue, 26 Mar 2013 15:01:58 -0400 Received: from [2001:470:d4ed:0:ea11:32ff:fea1:831a] (helo=ohm.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UKZ7z-0007yv-Iu; Tue, 26 Mar 2013 20:01:48 +0100 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1UKZ7x-0002S5-TO; Tue, 26 Mar 2013 20:01:45 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Tue, 26 Mar 2013 20:01:36 +0100 Message-Id: <1364324502-9124-5-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1364324502-9124-1-git-send-email-aurelien@aurel32.net> References: <1364324502-9124-1-git-send-email-aurelien@aurel32.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:470:1f15:c4f::1 Cc: Aurelien Jarno Subject: [Qemu-devel] [PATCH 04/10] target-i386: SSE4.2: fix pcmpXstrm instructions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org pcmpXstrm instructions returns their result in the XMM0 register and not in the first operand. Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson --- target-i386/ops_sse.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h index 0667c87..4a95f41 100644 --- a/target-i386/ops_sse.h +++ b/target-i386/ops_sse.h @@ -2116,16 +2116,16 @@ void glue(helper_pcmpestrm, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, if ((ctrl >> 6) & 1) { if (ctrl & 1) { for (i = 0; i < 8; i++, res >>= 1) { - d->W(i) = (res & 1) ? ~0 : 0; + env->xmm_regs[0].W(i) = (res & 1) ? ~0 : 0; } } else { for (i = 0; i < 16; i++, res >>= 1) { - d->B(i) = (res & 1) ? ~0 : 0; + env->xmm_regs[0].B(i) = (res & 1) ? ~0 : 0; } } } else { - d->Q(1) = 0; - d->Q(0) = res; + env->xmm_regs[0].Q(1) = 0; + env->xmm_regs[0].Q(0) = res; } } @@ -2154,16 +2154,16 @@ void glue(helper_pcmpistrm, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, if ((ctrl >> 6) & 1) { if (ctrl & 1) { for (i = 0; i < 8; i++, res >>= 1) { - d->W(i) = (res & 1) ? ~0 : 0; + env->xmm_regs[0].W(i) = (res & 1) ? ~0 : 0; } } else { for (i = 0; i < 16; i++, res >>= 1) { - d->B(i) = (res & 1) ? ~0 : 0; + env->xmm_regs[0].B(i) = (res & 1) ? ~0 : 0; } } } else { - d->Q(1) = 0; - d->Q(0) = res; + env->xmm_regs[0].Q(1) = 0; + env->xmm_regs[0].Q(0) = res; } }