From nobody Wed Nov 5 10:40:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1533788826830600.7138040935656; Wed, 8 Aug 2018 21:27:06 -0700 (PDT) Received: from localhost ([::1]:47246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fncXR-0004h2-KA for importer@patchew.org; Thu, 09 Aug 2018 00:27:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fncSp-0000lX-Av for qemu-devel@nongnu.org; Thu, 09 Aug 2018 00:22:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fncSo-0007D2-HH for qemu-devel@nongnu.org; Thu, 09 Aug 2018 00:22:19 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:44953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fncSo-0007CK-Aq for qemu-devel@nongnu.org; Thu, 09 Aug 2018 00:22:18 -0400 Received: by mail-pg1-x529.google.com with SMTP id r1-v6so2099238pgp.11 for ; Wed, 08 Aug 2018 21:22:18 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id m30-v6sm7355799pff.121.2018.08.08.21.22.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Aug 2018 21:22:16 -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=LD/vcIqlnO0xpD+E8Q45wGd4xiipQg1fxpSpB81mnec=; b=MwlTbhUNMbEESZq4YrbjKtslfLV9VhF8S7+hkvSKE9yAc97G/UDoqb4yL5UQ5K15Q/ rP7S5nqWuQf64FzbEbeBKnC6MIy0dBzjBb6eJiKs8OFbNGV8pWpaPOjzIkKZgRX+SCg+ aczV57JKf+66ORPSB8s7+vaI0K8gLG9nG2tZo= 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=LD/vcIqlnO0xpD+E8Q45wGd4xiipQg1fxpSpB81mnec=; b=Gs6WzZxbFyeQLnSFlxwnjHRo9KqNPeim7EabC8vozJaTvsrDTCJ3qDA7cF/kIdA1P3 d8xZdoizPThKvuqVfVmC0+HEIxfcRn5HfgOqrzmsFKnptamN0N5ZDEvDNZTw6fApMzx4 igpVFpjKtKrgpPPqmjyQVgLX2jkHzurwBf1+WJy1Ae+6W2j8i+f84aEtcf48eayHayLL 0xw4E+8vEAzpH04o8uEQmY70Bd1Y0n11kdomBqzMxDvtxOyUBpm0KGOtrv8Mnik4Qr3K g03EOSC9Np3FLHVYDHIsZjRU8TM8htKWeiJaHZMOtJ0Wfo1Kx9NTjWLecWI2vvqjrKpI EZ1w== X-Gm-Message-State: AOUpUlFDOkBzHY0OevCw1FRJew5QZ4ZYQT9hN94EHNNMVfrxAQtxlaUU Xx3SETAiFK89T9tZhKS4OcymGTGNDcc= X-Google-Smtp-Source: AA+uWPyOpJa68+Z4kkb9J942fzjKLmx8l8nLGOgkiIi7VAdxbbCwNAZYj6Wgw5/AxV0S4p2Pf+0b8g== X-Received: by 2002:a62:4dc1:: with SMTP id a184-v6mr565653pfb.5.1533788537140; Wed, 08 Aug 2018 21:22:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 8 Aug 2018 21:21:52 -0700 Message-Id: <20180809042206.15726-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180809042206.15726-1-richard.henderson@linaro.org> References: <20180809042206.15726-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::529 Subject: [Qemu-devel] [PATCH 06/20] target/arm: Fix arm_current_el for user-only 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: laurent.desnogues@gmail.com, peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Saves about 12k code size in qemu-aarch64. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 2d6d7d03aa..aedaf2631e 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1958,6 +1958,9 @@ static inline bool arm_v7m_is_handler_mode(CPUARMStat= e *env) */ static inline int arm_current_el(CPUARMState *env) { +#ifdef CONFIG_USER_ONLY + return 0; +#else if (arm_feature(env, ARM_FEATURE_M)) { return arm_v7m_is_handler_mode(env) || !(env->v7m.control[env->v7m.secure] & 1); @@ -1984,6 +1987,7 @@ static inline int arm_current_el(CPUARMState *env) =20 return 1; } +#endif } =20 typedef struct ARMCPRegInfo ARMCPRegInfo; --=20 2.17.1