From patchwork Thu May 9 17:40:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 242803 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 3C17B2C00F5 for ; Fri, 10 May 2013 03:41:14 +1000 (EST) Received: from localhost ([::1]:33582 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaUq8-0006YG-0x for incoming@patchwork.ozlabs.org; Thu, 09 May 2013 13:41:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaUpa-0006Y8-1P for qemu-devel@nongnu.org; Thu, 09 May 2013 13:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaUpT-0001dW-C5 for qemu-devel@nongnu.org; Thu, 09 May 2013 13:40:37 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:35947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaUpT-0001dF-5e for qemu-devel@nongnu.org; Thu, 09 May 2013 13:40:31 -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 1UaUpR-0000rE-6K; Thu, 09 May 2013 19:40:29 +0200 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1UaUpQ-0002q9-2W; Thu, 09 May 2013 19:40:28 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Thu, 9 May 2013 19:40:27 +0200 Message-Id: <1368121227-10885-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:470:1f15:c4f::1 Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Richard Henderson Subject: [Qemu-devel] [PATCH for 1.5] target-i386 ROR r8/r16 imm instruction fix 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 Fix EFLAGS corruption by ROR r8/r16 imm instruction located at the end of the TB, similarly to commit 089305ac for the non-immediate case. Reported-by: Hervé Poussineau Cc: Richard Henderson Signed-off-by: Aurelien Jarno Reviewed-by: Richard Henderson --- target-i386/translate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/translate.c b/target-i386/translate.c index 524a0b4..0aeccdb 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -1871,6 +1871,7 @@ static void gen_rot_rm_im(DisasContext *s, int ot, int op1, int op2, if (is_right) { tcg_gen_shri_tl(cpu_cc_src2, cpu_T[0], mask - 1); tcg_gen_shri_tl(cpu_cc_dst, cpu_T[0], mask); + tcg_gen_andi_tl(cpu_cc_dst, cpu_cc_dst, 1); } else { tcg_gen_shri_tl(cpu_cc_src2, cpu_T[0], mask); tcg_gen_andi_tl(cpu_cc_dst, cpu_T[0], 1);