From patchwork Wed Oct 25 09:35:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 10026289 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F14C6601E8 for ; Wed, 25 Oct 2017 09:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0189E26BE9 for ; Wed, 25 Oct 2017 09:59:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA26E26D08; Wed, 25 Oct 2017 09:59:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5FB1026CFC for ; Wed, 25 Oct 2017 09:59:37 +0000 (UTC) Received: from localhost ([::1]:47401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7ITI-0002ow-DX for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 Oct 2017 05:59:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e7I6k-0008VC-Q7 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e7I6g-0008OF-Uw for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:18 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:55144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e7I6g-0008Nc-P1 for qemu-devel@nongnu.org; Wed, 25 Oct 2017 05:36:14 -0400 Received: by mail-wm0-x244.google.com with SMTP id r68so636357wmr.3 for ; Wed, 25 Oct 2017 02:36:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1YzcUFrzwyWqPKjOQq7fU9rA3n3e77TXXkeaB5EeAco=; b=VPzNsU/wr9k195SwA3qlhXc+G+zKvDtGxUizooPUuxTzi8etQ/zAL2KvTOjNAlDnjl 0Ez8G2Qs4iENbc5/KlxtHCKF0ZUfY1pHSoLXOwpCjO4Mm5zMIEenD/DBEp5gPFDpCI5g H/vQ7c6gqmBQmVJ1De12t1xeqBhwQdIV6i8ag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1YzcUFrzwyWqPKjOQq7fU9rA3n3e77TXXkeaB5EeAco=; b=O5URZEmS1SiCqD4WoD+0Gfv8EViSzwcUtnfgnRohE7RoUTWvHT0gTTLVOm2jlgdCI6 5ipG/pukZY+WGRvxMCldHYFiyxwyDnEeaga0jOGHGB9CIqAZfX17l/kdE/Nqn/H0I3KR Q08E0l1q1APIKhj5iBDvw7VC7Qzxyxp2iO8Jdf/S1aldZwig9VK5HQWDx9xUw3mRG6s/ 5OHGB6YZGzUrCEnveMfn9OEDHQ9+T5v67U9X/OnUAh72r8HLFoHa8+HBcfkhmJyGQfYh k7+fjYjRO3VMiuirhKhWkcIkB+vcyPCyXT3wkR1C8sKiVDdBdan2sV0Js0f8HizEH2a/ Ts2A== X-Gm-Message-State: AMCzsaX0MQFaKwR+nHGUoJDlAFMh4IQavMcKZhu9/afHFY3CWVhcRwa4 IsZ1xkH0tcRfeaDVNv6gfsAW0FTJWLI= X-Google-Smtp-Source: ABhQp+SwtIZAgel4sZRe25a6gpi2RLtEXDlmaq/xkZe3SuhHvAnJwKZLKvHv6WjWtooa4uuwpeDM4w== X-Received: by 10.28.58.145 with SMTP id h139mr1098976wma.56.1508924173631; Wed, 25 Oct 2017 02:36:13 -0700 (PDT) Received: from cloudburst.twiddle.net ([62.168.35.107]) by smtp.gmail.com with ESMTPSA id v23sm2751025wmh.8.2017.10.25.02.36.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Oct 2017 02:36:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 25 Oct 2017 11:35:12 +0200 Message-Id: <20171025093535.10175-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171025093535.10175-1-richard.henderson@linaro.org> References: <20171025093535.10175-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 28/51] target/i386: check CF_PARALLEL instead of parallel_cpus X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, "Emilio G. Cota" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Emilio G. Cota" Thereby decoupling the resulting translated code from the current state of the system. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/i386/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 2e2e0dbddc..70ba0b2d5a 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -5307,7 +5307,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu) if (!(s->cpuid_ext_features & CPUID_EXT_CX16)) goto illegal_op; gen_lea_modrm(env, s, modrm); - if ((s->prefix & PREFIX_LOCK) && parallel_cpus) { + if ((s->prefix & PREFIX_LOCK) && (tb_cflags(s->base.tb) & CF_PARALLEL)) { gen_helper_cmpxchg16b(cpu_env, cpu_A0); } else { gen_helper_cmpxchg16b_unlocked(cpu_env, cpu_A0); @@ -5318,7 +5318,7 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu) if (!(s->cpuid_features & CPUID_CX8)) goto illegal_op; gen_lea_modrm(env, s, modrm); - if ((s->prefix & PREFIX_LOCK) && parallel_cpus) { + if ((s->prefix & PREFIX_LOCK) && (tb_cflags(s->base.tb) & CF_PARALLEL)) { gen_helper_cmpxchg8b(cpu_env, cpu_A0); } else { gen_helper_cmpxchg8b_unlocked(cpu_env, cpu_A0);