From patchwork Tue Jun 7 02:47:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 579301 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5806:0:0:0:0 with SMTP id j6csp4667922max; Mon, 6 Jun 2022 19:56:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+4oVev6jIewbcJ+DJfaG78umRHpBIkq+8GowRtecAt3KA9y/H4y2atafgOakJEbzbt66P X-Received: by 2002:a05:6214:2589:b0:464:69ea:771c with SMTP id fq9-20020a056214258900b0046469ea771cmr24118953qvb.41.1654570601808; Mon, 06 Jun 2022 19:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654570601; cv=none; d=google.com; s=arc-20160816; b=f2fmIKxAQSCj4egCGKk64GwcNCBHl+zyab0IUdNHJDYHRLL/BAC00Jw8lQ0aiMxuBi O3YXkPLruMpxS3vwtCZNCFa3dZ51M5hybg3xEIMiEfbJbuvUEf3sGo9UA7KLZ9sUf1zQ Fk1MZ9Vzm06ynyFbkiV4gcGGknZxJRZgQ5kmNrNSgXZ7d1BYKQyF4mUSwf9cX5CyX7ho 5bfEkBVDXGsOOf+/eBCmocYNBdPhLKRyCRt1jSJ7eAdwmBuMHTtjbhBJ/6DV+76veX1g ZrDX/DTobMcdgwFqKcMpaC39VqvX0krudZOo6d5LqTa9s6GEDOtQKOfzzxINoGKtURNS rVhA== 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:cc:to :from:dkim-signature; bh=SyvEw0v6kbVYTBLHikS3UDLCGmQvw9Yz1NNALVd/Wyo=; b=068MQW8irRMiaRl/3Zp1mtQhnNjylnZUTMvfs1kjEurmivbt1ko46LOUNP/2LGERhw P+y69Rn/t4pO6Rxb8Ix6p4IrGroGAXv+jlLYDL+G5KHGyufnMzSwDNBL52HheDrkiyV9 8Q/pcuQGJJjY0KAeTifzIgQ0w2hdXy+8Ef6734oz7hwacw4v421z4E18DeJNIRnldJk6 MTzdcpRIeMetOvlfg7khRx5YH6gG2ECtrE43PLY1QpnOm+4UPQrRaVid9EzRo8qcJlMw Nemj3fpoJTI3Sdwew4GCj3ZQ8/vyCwpV5jMFKZDLomKGWhwkyXQQZLtWP3TudGitMiUE mhVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MBUKvjyr; 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 jz2-20020a0562140e6200b0046267c4af9dsi5686075qvb.266.2022.06.06.19.56.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Jun 2022 19:56:41 -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=MBUKvjyr; 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]:45382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyPOb-0004rI-B9 for patch@linaro.org; Mon, 06 Jun 2022 22:56:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyPG5-00075O-9b for qemu-devel@nongnu.org; Mon, 06 Jun 2022 22:47:53 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:42675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyPFt-0000Hf-73 for qemu-devel@nongnu.org; Mon, 06 Jun 2022 22:47:52 -0400 Received: by mail-pj1-x102a.google.com with SMTP id d12-20020a17090abf8c00b001e2eb431ce4so14214012pjs.1 for ; Mon, 06 Jun 2022 19:47:40 -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 :mime-version:content-transfer-encoding; bh=SyvEw0v6kbVYTBLHikS3UDLCGmQvw9Yz1NNALVd/Wyo=; b=MBUKvjyrwR4arOEVmAGOy6mwQkAapGNZLmSgHPucF0q9w2GSR+Y3ddqNSh1gthAq74 r2GXkomWUFne7L8d1dIR3sElpL8NCx0pzCiM5WEmEtvYZoQZ0e6vxaZ7gcsOPXJo8kXe T/vmE2fE0LEWsIUfpzrxQgqETP+yZyyrob6g4Gm4mRUJqleVVw+wuF3wNJ5Bj9eptgu4 0KxNEL2YkrhOozC8AeYABroTwCP8SQ0ej3Hk9v0boo+5qsOnyKo2M+AzSA0r8yrMO/S9 G+b9uU4LzHmEoJn+7fxBo3Tolt/jpOlMluQtnPL5VJFZhzJbDgOcTDquQg5lpAX19I+N SIyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SyvEw0v6kbVYTBLHikS3UDLCGmQvw9Yz1NNALVd/Wyo=; b=XJaMScvWfrb7Cu9YU277S2+jGSghcmXzjDpbpQ1LWhB1ouAVUqXBJcalW2RBuxJtDm VBtM/V6ExUWkWKwNSfP9OS5Gn9wF3LIPX0FfPmOPS/0kg3eecdX6a6berI/g7T2iYuU/ cMSDFwcPcOZ/wUe3yxPJi2CGJqS7E+MnCyZUXJV1oWcI7PQBuWjQ70OdNQmpOcYOrVqR 8AC/FjxQCGmDKm4Ho0sI3e7GPutqKCjeCTA8HFC/cbdE9y/SPujsRnYoaCMT0XdMdNri i20zWgFJ6VAxf7Cxz6hjunxARVtRIxX6yzV5Aayai2rwkcxc4/sdIiTdamSdMqGsr8+d lPVw== X-Gm-Message-State: AOAM53366mlwoduiL0LPQJfEhNmmXOibWo3m0y+IerN1AXJakRCq/9zF uw06KCnCCwknYXLSq4BIMtUnN+PtWgPpAw== X-Received: by 2002:a17:90b:170b:b0:1e8:6d34:eba6 with SMTP id ko11-20020a17090b170b00b001e86d34eba6mr12740077pjb.105.1654570059849; Mon, 06 Jun 2022 19:47:39 -0700 (PDT) Received: from stoup.. ([2602:ae:1547:e101:d3db:cca:e5c9:6531]) by smtp.gmail.com with ESMTPSA id y26-20020aa7805a000000b0051876d83714sm7476904pfm.196.2022.06.06.19.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 19:47:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v2 05/25] target/arm: Move arm_singlestep_active out of line Date: Mon, 6 Jun 2022 19:47:14 -0700 Message-Id: <20220607024734.541321-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220607024734.541321-1-richard.henderson@linaro.org> References: <20220607024734.541321-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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=unavailable 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" Move the function to debug_helper.c, and the declaration to internals.h. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 c1865ad5da..2e115a0281 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3087,16 +3087,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 36c33a6ac5..148f2a9252 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1315,5 +1315,6 @@ void define_cortex_a72_a57_a53_cp_reginfo(ARMCPU *cpu); void aa32_max_features(ARMCPU *cpu); int exception_target_el(CPUARMState *env); +bool arm_singlestep_active(CPUARMState *env); #endif diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 46893697cc..1abf41c5f8 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) {