Received: from eggs.gnu.org ([208.118.235.92]:38898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZ8D-0004tl-5D for qemu-devel@nongnu.org; Tue, 26 Mar 2013 15:02:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKZ8A-0005s0-JU for qemu-devel@nongnu.org; Tue, 26 Mar 2013 15:02:01 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:49206) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKZ8A-0005nx-AV for qemu-devel@nongnu.org; Tue, 26 Mar 2013 15:01:58 -0400 From: Aurelien Jarno Date: Tue, 26 Mar 2013 20:01:37 +0100 Message-Id: <1364324502-9124-6-git-send-email-aurelien@aurel32.net> In-Reply-To: <1364324502-9124-1-git-send-email-aurelien@aurel32.net> References: <1364324502-9124-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH 05/10] target-i386: SSE4.2: fix pcmpXstrX instructions in "Ranges" mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno Fix the order of the of the comparisons to match the "Intel 64 and IA-32 Architectures Software Developer's Manual". Signed-off-by: Aurelien Jarno --- target-i386/ops_sse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h index 4a95f41..51c5fc9 100644 --- a/target-i386/ops_sse.h +++ b/target-i386/ops_sse.h @@ -2019,8 +2019,8 @@ static inline unsigned pcmpxstrx(CPUX86State *env, Reg *d, Reg *s, res <<= 1; v = pcmp_val(s, ctrl, j); for (i = ((validd - 1) | 1); i >= 0; i -= 2) { - res |= (pcmp_val(d, ctrl, i - 0) <= v && - pcmp_val(d, ctrl, i - 1) >= v); + res |= (pcmp_val(d, ctrl, i - 0) >= v && + pcmp_val(d, ctrl, i - 1) <= v); } } break; -- 1.7.10.4