From patchwork Fri Jun 10 16:07:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 580603 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp1888602max; Fri, 10 Jun 2022 09:13:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyZE0KOn24bFGRJWlbxG7FaWzFmr9zxZhIFa9NMH56wyu9tMyKPRRcrz3MHatkhyAaD508 X-Received: by 2002:a05:622a:190d:b0:2fc:10f8:a0b7 with SMTP id w13-20020a05622a190d00b002fc10f8a0b7mr37730355qtc.527.1654877638408; Fri, 10 Jun 2022 09:13:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654877638; cv=none; d=google.com; s=arc-20160816; b=lOl44IvtW1/OHB60+mQJlqlSyCrkrZZuTCQXxGg4qFjMhbhKKqRIk3H2zZK4pGFSrw gvOA287YFcbjpqcf70sAKLCw/mfIhel633uWwSKUCUrO4SZLX6+Ceo35cAIkxP+uSSMU GlYHBBSjYfvDwBTgLD+frOnYzd2PlrUYuw4jdzhTbtMaLdCVJerbX2/2bRj+1vATxaY2 ez9otqFc+ulp+LaTLfjaqFo0x7ldppil9S7b+e+lP9RIXAD/ee41grIkt1iq3khLtRIL WHzJ5NzO2kwB5D4e7dbejhxbjFEWtHdCfuL5aP52+jMH3F8R6rcZahYlZXxvX8TiDr3a NQhQ== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=lH6ItysORPPk9UTIkMgi6tmR9z/veGNwlpK6Zu3O9R0=; b=W4zhKl9Mna5jWGM5Em8hr/8vBR3aNoB1heQtRmWWri2C5MyJTodqTcRI06jc0z/qpH 7gp0WOQ48xnM9KUOW8r1GZB7Ov8+LWsyLCj1Muus+hDOXKYbwAL07xc8ZcsNoIawhcTQ V5xoBeATNnbWahYjmYaolSfPYTmgPSDNboR6IsnVizdalIx7Qcx6zio/RAfE1uy+Fxrj w9XwrGe/i4jOxJG6jj6KZASFl3fcX2k6Vhuhdya1puG/SG68idujZ2XbJnVBOZeXkVtd +V9iXlqVe5gnqx5P+PT1Zh3e1/3jvYuYUcxZuLxilrym6Og43eOEXdTr14qcpKwIUcWT gg8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U5BQCklR; 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=pass (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 hu13-20020a056214234d00b004644cf902d8si15757553qvb.362.2022.06.10.09.13.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jun 2022 09:13:58 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=U5BQCklR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzhGo-0008Pm-0M for patch@linaro.org; Fri, 10 Jun 2022 12:13:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzhAq-0007PM-QL for qemu-devel@nongnu.org; Fri, 10 Jun 2022 12:07:52 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:39411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzhAp-0007F1-8a for qemu-devel@nongnu.org; Fri, 10 Jun 2022 12:07:48 -0400 Received: by mail-wm1-x333.google.com with SMTP id i131-20020a1c3b89000000b0039c6fd897b4so881456wma.4 for ; Fri, 10 Jun 2022 09:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=lH6ItysORPPk9UTIkMgi6tmR9z/veGNwlpK6Zu3O9R0=; b=U5BQCklR3C5nw+ecKSDKx62WrwVCFuVzLAyrbjGp6epsXjicE91AhQk34+y283i0Em sFr5K6+R5DtnBaffz3vGFWfltZHZpvNlM4JeftwbHODRkuuiuZNxkskaVIwpFtZa1Sz2 ECuoiNXjtWyDxB32bZhhdI3LFFo7wJPMGL27GmoktzoECLTHhFw3CVVe2VEhBcTJRiU6 ve4lruYsVHnQ3lyfcn4Qc5oAzSv6ToahTmGKyLBlbGl2+mAvH7xCiw+k0Nq6K8XH6tuk BJsRX0rFE7No4oS7lCHEaaIj0Fj4AvutavXH/1jQHHYrxnHAuu2aSs8hzkeZ3jMfXUat EAlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lH6ItysORPPk9UTIkMgi6tmR9z/veGNwlpK6Zu3O9R0=; b=jLSHX5+ZWrOS1FiG8tgppAEsD70vQ8JxVOfUbC6AoIk0UaZns+ggvISPK0SNf8gNPq 7Ej/W3kzOnIBYPyjAzBcjePgfGPSWRX6mSMo+j/x9gJ59VuXkN2qXZVGzGPN/qe38G3X gq8DoDu44pTHcn/t6txnBnkJwz6T18kGbi1zXw4S3fMkB+7Ihsmbmk2HP86HIcNvLEQR wfjVGwMZFf2v7Tn8l3cndfNvic7rqIc79G5trPFp8mqPFMIRfWPp1CtFZBzow53jEy+u 9q2LCp16W3Nns7dVWhLmrE649f6/lY3elSKdE6oioFRZGzsuiNRUrkw+1K/2+IZqWmje 9Rrg== X-Gm-Message-State: AOAM5314ccSqkPyreF8XFy3mFPmPQJvB2NFo2Bzl9NCQ/Lgdfu16KBNu BWYvOTdaSnpGmmOg5GMw+2UnIpy2LPoafA== X-Received: by 2002:a05:600c:2d16:b0:39c:4d18:f77 with SMTP id x22-20020a05600c2d1600b0039c4d180f77mr479728wmf.146.1654877265380; Fri, 10 Jun 2022 09:07:45 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id bp11-20020a5d5a8b000000b0020c5253d926sm14276053wrb.114.2022.06.10.09.07.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jun 2022 09:07:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/28] target/arm: Move arm_singlestep_active out of line Date: Fri, 10 Jun 2022 17:07:14 +0100 Message-Id: <20220610160738.2230762-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610160738.2230762-1-peter.maydell@linaro.org> References: <20220610160738.2230762-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" From: Richard Henderson Move the function to debug_helper.c, and the declaration to internals.h. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20220609202901.1177572-5-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu.h | 10 ---------- target/arm/internals.h | 1 + target/arm/debug_helper.c | 12 ++++++++++++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 78dbcb5592c..bb1dc3289a2 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3106,16 +3106,6 @@ static inline bool arm_generate_debug_exceptions(CPUARMState *env) } } -/* Is single-stepping active? (Note that the "is EL_D AArch64?" check - * implicitly means this always returns false in pre-v8 CPUs.) - */ -static inline bool arm_singlestep_active(CPUARMState *env) -{ - return extract32(env->cp15.mdscr_el1, 0, 1) - && arm_el_is_aa64(env, arm_debug_target_el(env)) - && arm_generate_debug_exceptions(env); -} - static inline bool arm_sctlr_b(CPUARMState *env) { return diff --git a/target/arm/internals.h b/target/arm/internals.h index af9de2dbe52..64e2c1dfad4 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1325,6 +1325,7 @@ bool el_is_in_host(CPUARMState *env, int el); void aa32_max_features(ARMCPU *cpu); int exception_target_el(CPUARMState *env); +bool arm_singlestep_active(CPUARMState *env); /* Powers of 2 for sve_vq_map et al. */ #define SVE_VQ_POW2_MAP \ diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 46893697cc7..1abf41c5f85 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -11,6 +11,18 @@ #include "exec/exec-all.h" #include "exec/helper-proto.h" + +/* + * Is single-stepping active? (Note that the "is EL_D AArch64?" check + * implicitly means this always returns false in pre-v8 CPUs.) + */ +bool arm_singlestep_active(CPUARMState *env) +{ + return extract32(env->cp15.mdscr_el1, 0, 1) + && arm_el_is_aa64(env, arm_debug_target_el(env)) + && arm_generate_debug_exceptions(env); +} + /* Return true if the linked breakpoint entry lbn passes its checks */ static bool linked_bp_matches(ARMCPU *cpu, int lbn) {