From patchwork Tue Mar 26 19:01:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 231522 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 6C9852C0091 for ; Wed, 27 Mar 2013 06:16:14 +1100 (EST) Received: from localhost ([::1]:59026 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZBl-0001tB-JF for incoming@patchwork.ozlabs.org; Tue, 26 Mar 2013 15:05:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZ8E-0004tw-Ql 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-0005s6-K1 for qemu-devel@nongnu.org; Tue, 26 Mar 2013 15:02:02 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:49208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZ8A-0005o1-AR 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-0007yt-7g; Tue, 26 Mar 2013 20:01:47 +0100 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1UKZ7x-0002Rv-Ra; Tue, 26 Mar 2013 20:01:45 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Tue, 26 Mar 2013 20:01:34 +0100 Message-Id: <1364324502-9124-3-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 02/10] target-i386: SSE4.2: fix pcmpgtq instruction 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 The "Intel 64 and IA-32 Architectures Software Developer's Manual" (at least recent versions) clearly says that the comparison is signed. Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson --- target-i386/ops_sse.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h index cad9d75..0136df9 100644 --- a/target-i386/ops_sse.h +++ b/target-i386/ops_sse.h @@ -1933,8 +1933,7 @@ void glue(helper_mpsadbw, SUFFIX)(CPUX86State *env, Reg *d, Reg *s, } /* SSE4.2 op helpers */ -/* it's unclear whether signed or unsigned */ -#define FCMPGTQ(d, s) (d > s ? -1 : 0) +#define FCMPGTQ(d, s) ((int64_t)d > (int64_t)s ? -1 : 0) SSE_HELPER_Q(helper_pcmpgtq, FCMPGTQ) static inline int pcmp_elen(CPUX86State *env, int reg, uint32_t ctrl)