From nobody Wed Nov 12 16:26:20 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1571421817; cv=none; d=zoho.com; s=zohoarc; b=SU7PP3hSyRd7D7gD0tGs5xyF7JQqotBALztnu1/qnbe+y2z4T7bZo0i3m8xl7Mp+n5oPmFThXsKXT2A1zbAYjQhadPCcCP6atUBwVf51dxhufcnaS+hWbv0M+3Lqk7LaZQzdWkjjw/9JEAuspDnv3obP3Z6etbekRGZAxdrPfhU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571421817; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=EExBny+oAa/2RvpDTj0xViQxKJSM6o83jutlTagIpwU=; b=iJZhY+e+ZHSah21Qv4UCozh1but72zsgVXhswd1+eXOnT6jHerjL/5QDmxaaDERV2a5ICeQcnlFhEUeEMfC5WXUKy8CM1RtKhfojCE6anP7mNuFSPLY/WqekkdiVvP9XzQWp5OCf/tOwxspJ0EoLpoOBIqnWDc2Ld5tAy4CINyY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1571421817083397.44043750499725; Fri, 18 Oct 2019 11:03:37 -0700 (PDT) Received: from localhost ([::1]:44554 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLWb9-0000SL-42 for importer@patchew.org; Fri, 18 Oct 2019 14:03:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59246) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLWIw-0006Y9-Py for qemu-devel@nongnu.org; Fri, 18 Oct 2019 13:44:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLWIu-0005RZ-EF for qemu-devel@nongnu.org; Fri, 18 Oct 2019 13:44:46 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:42904) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLWIu-0005Pq-6Y for qemu-devel@nongnu.org; Fri, 18 Oct 2019 13:44:44 -0400 Received: by mail-pf1-x444.google.com with SMTP id q12so4311358pff.9 for ; Fri, 18 Oct 2019 10:44:43 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id d20sm7857534pfq.88.2019.10.18.10.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 10:44:41 -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=EExBny+oAa/2RvpDTj0xViQxKJSM6o83jutlTagIpwU=; b=jqqk+gJiZ9YrCR3dy0o3Lgiw7Z6ZqhF1P8W+cy4NtzomqpZ8PrM4mz/jL6j2JhgsR5 HxiaSaMqOiq7zTWCHl0SU8YnfWKfBh8Rau+7AdBfO00MPF7tCs1D/nW7POj3E6RR4+Np fvCuO5qo5WDIrHNgR2CL6kUZfBP+V1HA6e8McptspXkKcsXDJxDCi4edsDzua71ZCdsc +4OwL01JdMDficT9qtIHihX0x/W6TZ9kchFmNVS7QjKblCnpR3QuWPYoEoJ+v/3u6fYa QOFbuZzbGa1IvMe1rUEXsXulOD4ZUJMSU3Kl2PS5ECL2v5n5gPqxEJQCa3zcxsXR88pG ZHPw== 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:mime-version:content-transfer-encoding; bh=EExBny+oAa/2RvpDTj0xViQxKJSM6o83jutlTagIpwU=; b=XOiGNherXt8KTVN8r/CoFT2BXlj0kE9rvTG9KQj7WbUfLj8SZ/u8hfEaH3E3kxsuLx 9sHocId7eDLdt5pC1zhGy5Ioa1LVqraFlOcnoQEAlDq9m+IVHElaRzi32mcrLVLJFFmm kLPMxOihc/BBVYr+/gS4Ks7Bv6aAb9dyX44O+rX+2bq0iC9SLki372xVzZXnqXYjP1S0 3B7Ylngn1ozb91SIjtqxC0d56CNxKAzCRHluevTrlxxU9dV0M8WIvfL2A0ClgwE5z+Fp MvjVBfIoieVxSTN/CvMxQgcQudj41+fDn2hHcBKkWbAdJC8Hk2p+Nc32iR+7Vlogyrqt jOHg== X-Gm-Message-State: APjAAAVsALiqBTI+ig6yp/r0cq+dRVB+GUBuSo0Nj6PKxuSzKvTVha1X BfAU8vrrJaBFwtsM+uxSDUuqHznC0R8= X-Google-Smtp-Source: APXvYqzLQUC6hh/IqxoPtGDjyO1VhA5GgyP8xz1xzWcTx/3ot4w+5tTZnPHPfizhpflbjIvQy1ggDw== X-Received: by 2002:a62:b616:: with SMTP id j22mr8036487pff.55.1571420682064; Fri, 18 Oct 2019 10:44:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v8 08/22] target/arm: Split out rebuild_hflags_aprofile Date: Fri, 18 Oct 2019 10:44:17 -0700 Message-Id: <20191018174431.1784-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191018174431.1784-1-richard.henderson@linaro.org> References: <20191018174431.1784-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Create a function to compute the values of the TBFLAG_ANY bits that will be cached, and are used by A-profile. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Richard Henderson --- target/arm/helper.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index d1cd54cc93..ddd21edfcf 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -11106,18 +11106,28 @@ static uint32_t rebuild_hflags_m32(CPUARMState *e= nv, int fp_el, return rebuild_hflags_common_32(env, fp_el, mmu_idx, flags); } =20 +static uint32_t rebuild_hflags_aprofile(CPUARMState *env) +{ + int flags =3D 0; + + flags =3D FIELD_DP32(flags, TBFLAG_ANY, DEBUG_TARGET_EL, + arm_debug_target_el(env)); + return flags; +} + static uint32_t rebuild_hflags_a32(CPUARMState *env, int fp_el, ARMMMUIdx mmu_idx) { - return rebuild_hflags_common_32(env, fp_el, mmu_idx, 0); + uint32_t flags =3D rebuild_hflags_aprofile(env); + return rebuild_hflags_common_32(env, fp_el, mmu_idx, flags); } =20 static uint32_t rebuild_hflags_a64(CPUARMState *env, int el, int fp_el, ARMMMUIdx mmu_idx) { + uint32_t flags =3D rebuild_hflags_aprofile(env); ARMMMUIdx stage1 =3D stage_1_mmu_idx(mmu_idx); ARMVAParameters p0 =3D aa64_va_parameters_both(env, 0, stage1); - uint32_t flags =3D 0; uint64_t sctlr; int tbii, tbid; =20 @@ -11262,12 +11272,6 @@ void cpu_get_tb_cpu_state(CPUARMState *env, target= _ulong *pc, } } =20 - if (!arm_feature(env, ARM_FEATURE_M)) { - int target_el =3D arm_debug_target_el(env); - - flags =3D FIELD_DP32(flags, TBFLAG_ANY, DEBUG_TARGET_EL, target_el= ); - } - *pflags =3D flags; *cs_base =3D 0; } --=20 2.17.1