From patchwork Thu Feb 14 04:06:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 158311 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp879503jaa; Wed, 13 Feb 2019 20:07:23 -0800 (PST) X-Google-Smtp-Source: AHgI3IaC/u5KZn3qwlyCU+Sctk2Qs32/DW5GlLhh2Tpi8MUE70nvexLAp8mzkgznSUem9Qi5NYox X-Received: by 2002:a25:774d:: with SMTP id s74mr1365588ybc.204.1550117243770; Wed, 13 Feb 2019 20:07:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550117243; cv=none; d=google.com; s=arc-20160816; b=QNf/GDKVPc1+8tzhjl9MMUKYwcLNwXa86hDCCCzjBFfDWyHkzQ/Tz5F4BovYGft2Px 5r6R4K1W7akrmz1n3eF59xv/aLk8rnCBW9q7T58AAMxjyNUtf8teYuRZ9EfFzcGE3u2Y 44AmxWTCuylqfDCPS/CUcLTz2tRyU2uFkTv6UPTHAn8V5+4iZngIm3z9dVmyRNLe3mdD HZQu2OU8IoClSwiGGXdeEnI8eGTiEXpjFUL3vlf1NUe3mkq5OhTW7KzxLMZAO83o1tGR NltJ7nhJ+ynQGu+ih718UV3+izAMmTIFyL6AdoTR8zc7xbCoqxdP5G0O8I0BJWwnE0c8 xpQw== 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; bh=nodb+pXuGEzhw6weVrwdkSF8Vf1+sp5VvNRk+R4jG1I=; b=aCaXcqiGE24WqTUV84iq0Lt4CUlbSjnMZYqfaBP9NIIZx8TQKtXQeALvmgbROcxAwZ 2LoXZPaot3fu0xlMeILII+EHJc7nIJOjjojpQzev0UsG0qhGiIPBKKn064nDhj3E6U2C C+imhxQATAq0PEl6KIFUjh/lLsLyEVkTSbiLQCsYgviJMOxLuhq1dmig2Infki8OWAAn DwAErVpxKwZcJauGagkW2SrBtX3zNuW3COhIA+OCsHUopZSNr9oUmHiVFm5vY+kLAxpx /MDqZWbMyJ8CWJkAhd5px2vSiDAgQTGgeg6vqS8deAdiKPcwy6mRwHRaI40wOHiZM/EU W9+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BatPyJqj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id y186si706134ybf.254.2019.02.13.20.07.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 13 Feb 2019 20:07:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=BatPyJqj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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 ([127.0.0.1]:39546 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu8J1-0003F2-9R for patch@linaro.org; Wed, 13 Feb 2019 23:07:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu8If-0003DZ-Rs for qemu-devel@nongnu.org; Wed, 13 Feb 2019 23:07:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gu8Ie-0005fM-LD for qemu-devel@nongnu.org; Wed, 13 Feb 2019 23:07:01 -0500 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:38683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gu8Id-0005ch-OE for qemu-devel@nongnu.org; Wed, 13 Feb 2019 23:07:00 -0500 Received: by mail-pf1-x442.google.com with SMTP id q1so2367435pfi.5 for ; Wed, 13 Feb 2019 20:06:59 -0800 (PST) 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=nodb+pXuGEzhw6weVrwdkSF8Vf1+sp5VvNRk+R4jG1I=; b=BatPyJqj4ctOn/sckGxzrcNc8sGqUajDjMUddJSJlTeTMOJPqwwLy+F8LkhUExfTtl Eul6/xP86QI/D42w02WViq6Ae3LZEY6GGJOql18l/C+6W8VGoev3OTaXd/zQYA0JhEfJ wX7jhEQ4keyUkJtq2PA8CoyODvJlAMlEZ5llADvTNYPKkMkVVughNX9mdFFL657W61fT eNf8dMc1rs2erfPAW3WSUAYwIjM5iKG7zHyvtaidy7x4yc+4+cjAmZEbD/BHAaoxXwYy u9o0Rmwjvj/dfiiT8aZcOtW32jorL0F+j7A+2NpA+c0emY3OPsFu0g4tm7wkXUgtWXoT 8nJw== 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=nodb+pXuGEzhw6weVrwdkSF8Vf1+sp5VvNRk+R4jG1I=; b=n1INAnU0HKJ/78ZU8gN+E0zjbjD2QQyHNJd4jRbhBuZfhN6uHUrTk5HlKtgOzJSH1I h8tMo5DvWSJ+1t/oawCFXSSA55UV9AmOGY/0pKRN8ZkE9dr4fzCYM2pkLLEs+dXAEzPM 8DA34PbLb1SgkHLQWW6rf1N2jQXnX0f95mKguTNkyXq+MkDcTFSsT1HyKRgr5e6ljRz+ Czwp2f88eqa5GseSdTYODygfUNQnhSEK/TYXKZroNBYed/K4NRYMBo3IqXs4drS5SjRr AEeQs15cXz3JRirCrm0E+qIiHBUOAo2yjiJJfG5QAZhxQwYuJwntqYwr50YLxzzEhPK4 dFtA== X-Gm-Message-State: AHQUAuZt+d6XaZuWP99NFiiysuVX+EbtPWjjUV2rlM0XDX0IeJA6lnVX QkjUY6rca9CGF7oa0vEv/7aedS6fyQ8= X-Received: by 2002:a63:1544:: with SMTP id 4mr1811825pgv.290.1550117218243; Wed, 13 Feb 2019 20:06:58 -0800 (PST) Received: from localhost.localdomain (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id b25sm1119581pfi.72.2019.02.13.20.06.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 20:06:57 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 13 Feb 2019 20:06:51 -0800 Message-Id: <20190214040652.4811-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214040652.4811-1-richard.henderson@linaro.org> References: <20190214040652.4811-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::442 Subject: [Qemu-devel] [PATCH 3/4] target/arm: Assert hflags is correct in cpu_get_tb_cpu_state 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, cota@braap.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Make sure that we are updating env->hflags everywhere required. Signed-off-by: Richard Henderson --- target/arm/helper.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 Reviewed-by: Alex Bennée diff --git a/target/arm/helper.c b/target/arm/helper.c index d8249f0eae..3c8724883d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -13902,11 +13902,13 @@ void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc, if (is_a64(env)) { *pc = env->pc; flags = rebuild_hflags_a64(env, current_el); + assert(flags == env->hflags); flags = FIELD_DP32(flags, TBFLAG_A64, BTYPE, env->btype); pstate_for_ss = env->pstate; } else { *pc = env->regs[15]; flags = rebuild_hflags_a32(env, current_el); + assert(flags == env->hflags); flags = FIELD_DP32(flags, TBFLAG_A32, THUMB, env->thumb); flags = FIELD_DP32(flags, TBFLAG_A32, CONDEXEC, env->condexec_bits); pstate_for_ss = env->uncached_cpsr;