From patchwork Thu Sep 14 17:52:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 112599 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1054266qgf; Thu, 14 Sep 2017 11:00:48 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDNkjSThjKZnE1rd82PLVWeaZ7+iCi2FYwPSBTNPVcppJn3Wz96yIpdnyGCKP9Lkn5CVro5 X-Received: by 10.55.109.66 with SMTP id i63mr3654993qkc.19.1505412048486; Thu, 14 Sep 2017 11:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505412048; cv=none; d=google.com; s=arc-20160816; b=VV6t9OAvlGG9irV+sCpwSwpWuZGYOzJ0ZAdKvEL8RgyKh0tQ3xz70+uQwMUdclO4kY C9YeeVcX4Z5oRR4V2GwGycPENDP9p+3oz++xO+b/5P5qvDp/G1/pgUshHXj/DValH8wv jgmGj+vAIZCL9Ie9eslLx6h12X46IRTbT5+mUwE867xzCBmYPhLY3M/4mBHUqUvJ70DT y3VeSLFRYW76da8qCO1F0mGh9gvzP8ezQUJNrMs/TksWSFKSNJRIe+h4kl6rESlev2u8 gwlYdPnFrLmmrnkx7/q6yJ0GcYuuCURTCbs0LoaH1FuxvR8SnLO5VIVM3QYZGbRKwVrr Xdwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=FZag1dnxQeKSVBlCOBUJiIAB3QC09+TIrKpoMrHQdw4=; b=AKUjAmdmC/Wjv0cIam1U5orxHnp7XeHxvx71sQXPXpbn79UXYf+ME+rV+RBsQJjj2X +0MnD7Ct2T0Z0mLDqgdxKN5uDoom8kEasHUzl7XqxwsV9ewoDQzuVc4pKNzJkxQsgwzK twovmrDLu5XN7h/u/7gNd1sF7SFq0J0HuPntGJuogW8rtOZQHeonRd53tlhiauYiuKTe TUsy1weQzr/IwG/tPwa2+ktqmWqjL+kyug8PerCj4lq4wtdA0VUIil1wyxtVop4+2u9R Kyo64mK6F/U/EduunV5kCDe09b+jnMVHBbGRTcTjXNPv60ajBN5kWpmhuF6UBu2FBIBW xkrg== ARC-Authentication-Results: i=1; mx.google.com; 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 a51si18518046qte.286.2017.09.14.11.00.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 14 Sep 2017 11:00:48 -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; 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]:49216 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsYRS-0000iD-6y for patch@linaro.org; Thu, 14 Sep 2017 14:00:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsYJc-00088D-1q for qemu-devel@nongnu.org; Thu, 14 Sep 2017 13:52:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsYJa-00082S-Tt for qemu-devel@nongnu.org; Thu, 14 Sep 2017 13:52:40 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsYJa-0007vb-Mp for qemu-devel@nongnu.org; Thu, 14 Sep 2017 13:52:38 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1dsYJQ-0005p0-2T for qemu-devel@nongnu.org; Thu, 14 Sep 2017 18:52:28 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 14 Sep 2017 18:52:40 +0100 Message-Id: <1505411573-27848-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505411573-27848-1-git-send-email-peter.maydell@linaro.org> References: <1505411573-27848-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 05/18] target/arm: Remove unnecessary '| 0xf0000000' from do_v7m_exception_exit() 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" In do_v7m_exception_exit(), there's no need to force the high 4 bits of 'type' to 1 when calling v7m_exception_taken(), because we know that they're always 1 or we could not have got to this "handle return to magic exception return address" code. Remove the unnecessary ORs. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Acked-by: Alistair Francis Message-id: 1505137930-13255-6-git-send-email-peter.maydell@linaro.org --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/target/arm/helper.c b/target/arm/helper.c index 1741e0d..fdd5cc6 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6306,7 +6306,7 @@ static void do_v7m_exception_exit(ARMCPU *cpu) */ env->v7m.cfsr[env->v7m.secure] |= R_V7M_CFSR_INVPC_MASK; armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE); - v7m_exception_taken(cpu, type | 0xf0000000); + v7m_exception_taken(cpu, type); qemu_log_mask(CPU_LOG_INT, "...taking UsageFault on existing " "stackframe: failed exception return integrity check\n"); return; @@ -6348,7 +6348,7 @@ static void do_v7m_exception_exit(ARMCPU *cpu) armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE); env->v7m.cfsr[env->v7m.secure] |= R_V7M_CFSR_INVPC_MASK; v7m_push_stack(cpu); - v7m_exception_taken(cpu, type | 0xf0000000); + v7m_exception_taken(cpu, type); qemu_log_mask(CPU_LOG_INT, "...taking UsageFault on new stackframe: " "failed exception return integrity check\n"); return;