From patchwork Fri Oct 20 23:20:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 116558 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2229374qgn; Fri, 20 Oct 2017 16:34:49 -0700 (PDT) X-Received: by 10.55.120.194 with SMTP id t185mr9177851qkc.202.1508542489300; Fri, 20 Oct 2017 16:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508542489; cv=none; d=google.com; s=arc-20160816; b=RY5N4nSMGK2Wq4B1WbVPk3WpGx7SzIjsuWdbIA/cYujwnNl8n1+l185CVOZy6dq0j2 WNE3dmFhMipOQgMR7JXB4AavXnRvwirRvD8dXzjU+ZIwW5eULCu5M724s7whYRmZAQXf a6O8bwsBeaHYNvKGfYRZ8lvnIw6CTYBtGPft+r7BQh9ma1eqJlW3Y8dtMk+8VEljzOGC NgkAKBFYNDVRFtcYqjvZ2C/JTlZI5BvoxmWxWzwIi3yJ4PLwdBDqyiNiPNOuVQwl9dlq Ayurkmgcb0widyXZFP0WruqfCg1PB5NCFefJmi2z3RcinjGVVVbnpPp4wjXFQ102GjZS UCTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=1YzcUFrzwyWqPKjOQq7fU9rA3n3e77TXXkeaB5EeAco=; b=zpseaFsisz2yjS73ruAAZ8Z+h51ZnWQvbcplvpgzjS/CRs5CDtgTnCM2+GWL7wo8bE GeI1zGbDoCWuG3PPEm/hs7bwtMfC0kyOQag0KO/qznVCtPAWDZye/CsSTzYM5uYH6fkI K/gU1d53JjzubdTglxYqWfpvO06hctC1ZqfPBYi6pwDU+FciS5s+2ny6ZcjeaSN4FVXS oLZP+8LwaGepGhawtOLvcsEqKm/CVyQalcnWYA3uigM0Hvzpw4F3DiLRg2q9DNPVGqpo 4jHeVaINmLcuTl7cdZOnHlnhusmp/zitI3nRCa8e2TtzV5VCwlcw2o6Uce86fgAhxBHf fkXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=f8Duo63o; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a4si1693618qkc.153.2017.10.20.16.34.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 20 Oct 2017 16:34:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=f8Duo63o; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5goR-00029O-6v for patch@linaro.org; Fri, 20 Oct 2017 19:34:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5gbG-0006FG-Ul for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:21:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5gbF-0007nX-Hg for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:21:10 -0400 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]:43670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5gbF-0007nL-BS for qemu-devel@nongnu.org; Fri, 20 Oct 2017 19:21:09 -0400 Received: by mail-pf0-x244.google.com with SMTP id a8so13074290pfc.0 for ; Fri, 20 Oct 2017 16:21:09 -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=f8Duo63owJslJhe8HokjZXY+3ksNG/kI0lZ/BFyWhur3b0fNSF4ovFNbCXUHQL5frS IOc93wt6q+zNMpWrVoq/rdXmjr2qKV9CZnt7TVHSWl8EztByhZ2aSYKhiHfV7IClYZax fb5hw6NCtKv/AotpnaLJWUyXiadBjHz8PAtEA= 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=D3nPUVknU9nnJtXIp2JkAyW3JzCRer4cMOUkUZz2acHTk5mTBdJes4nYDqj55cCcpq iw2CNIIEsHmMi42v3FNbx3QuctXJFHtuGOkioGP77m8dTStDL/qrDPbnxEzbHMzR2Gkp uP74oVtReotg5DvxJ5fDuYz37XFCMNLGYWgafObviarseSs8MmDv6TXCiwW8UmL59J+L D+rlc1PIGyK4vrwJMKBRSzysoR+GEjeEapha8MSg1o55x9rEgGYF94QywzJN8zSPCUjA l9aN7ek1lstRmDZdDSK65ra5RmR7mui+DYlBtt3TDw685zm4FqjyHBJ0zgDzEMfoLL9f Svyg== X-Gm-Message-State: AMCzsaVZNUVcOXJHWU4zEvCiioBh9jfL2ihUgC+xPam79od6NrKXts9m T69neTLph0YmnaLm9iVZG6relspFQZA= X-Google-Smtp-Source: ABhQp+Tk4ePAyDPdg6nYHrsvs4uIxBDJjBvdJYJNGQ5cuQGB7RHrHHYlfjHIvcVMqANqG5uykpxYqg== X-Received: by 10.84.233.10 with SMTP id j10mr5386717plk.14.1508541668221; Fri, 20 Oct 2017 16:21:08 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-165-104.tukw.qwest.net. [97.113.165.104]) by smtp.gmail.com with ESMTPSA id a17sm3532594pfk.173.2017.10.20.16.21.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2017 16:21:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 20 Oct 2017 16:20:00 -0700 Message-Id: <20171020232023.15010-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171020232023.15010-1-richard.henderson@linaro.org> References: <20171020232023.15010-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::244 Subject: [Qemu-devel] [PATCH v7 29/52] 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: pbonzini@redhat.com, cota@braap.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.13.6 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);