From patchwork Fri Jun 4 15:52:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 454082 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp566040jae; Fri, 4 Jun 2021 09:29:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPK0aqpq1HhlXLXn9A9cAkSAv+4IA2sFK9H5RJln6PcIqe1eOQ/vQBozsN15v7aHf4JT0/ X-Received: by 2002:a1f:3816:: with SMTP id f22mr3065455vka.17.1622824175361; Fri, 04 Jun 2021 09:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622824175; cv=none; d=google.com; s=arc-20160816; b=LHzEusdhjw8Hpgok3iGCT8mnaC3jhvouGKW5l7v/YRVP8v9T4CfdijtNg6GGlg9eA2 A0MKgHhoptI2HXdir/TEroi/lsp7sa1L+weZ38sP7Rl67ERsheJLl4CnWwHpuJZzrWfu /TmXC9HmwBpFDpwRckvsc+ODLjW0xAQQEUXC8GCAWcBgd+ACqLPQB9oMYsUDKfLOAJfM QLl+kGuCObFdxnWBHHRDv33tdqU07p6dsjvA3pwOwAUpPCXNub9LgvFFx3StaQPy5V53 mlF+sbysIvRWD5HJeZKqgyDp73x3KlWP2jxdxL6IEU/PChxCNqTILcUQx+0roVDcBMhE 3Rrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=aJVHeJ+pGUaeyhH82Xlk1CVXigUjkgZJpWNOfvUWY7I=; b=poZ0fDRpSq0xmDyVDWOZBU0YSAUJuTpreXBcbHGT6SIClxIAkz0pII6fdsKJmF/B3z O4e6Al3nGgCOx3uz+klK43+ZtPBD+ljUZYcb9+os9vRwhsvLXVdly+rGMHYAcu3OUZU1 H2DO/7QduT5XEkWbu5tWYQ8ibqk5eOb+OkpwfD+ipU5TgNjZfk5D8XY2foaceQnQNviQ pUO9v7mi49FoYdnaUBjRHeuYt1s1WStVqoDPTkJn3xTJ61I6M+nrKxqmGx3yok49FTfJ XpAKgtU1lBOF447qkzGk9h4xZ+bCpVRjmJyi5mZUAfRBr+whPuQDv77MEsG11x98VKgW Pmcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PY8oliIS; 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=fail (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 e11si867068vst.298.2021.06.04.09.29.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Jun 2021 09:29:35 -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=fail header.i=@linaro.org header.s=google header.b=PY8oliIS; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lpChS-0001Cu-Ph for patch@linaro.org; Fri, 04 Jun 2021 12:29:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lpCRM-00033k-5G for qemu-devel@nongnu.org; Fri, 04 Jun 2021 12:12:56 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:54183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lpCRF-0003qI-Jr for qemu-devel@nongnu.org; Fri, 04 Jun 2021 12:12:55 -0400 Received: by mail-wm1-x32c.google.com with SMTP id h3so5705257wmq.3 for ; Fri, 04 Jun 2021 09:12:49 -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=aJVHeJ+pGUaeyhH82Xlk1CVXigUjkgZJpWNOfvUWY7I=; b=PY8oliISMAt52zE7hZsr9LggbMNl1bp9EeWSqY8xK51X9QvcsR4jbQqJbQvGts43Po AKGV6IsvAZ1fl/YZCtcVQSsC0chw76tmhbYghNA4/Oxtz41KX5X/ZxlaC56LrxqVHx8U PbxzVKYdqS23JEOZwJpWdieQn5VXVJeYWZsEVB9nBCQPJH/hgwgFUBzNdeNWT2tRvAgN C06ChacCiSspBaOL1N3IaD/TGjCEdPD2zx6DWx4zFBgqo6RaTeUbGE+PbLaH6u71ZV3l Y9X8kTLT9QhEePgvfrvon9MjUpc5gg0oeRPI1jwbWLtoYe/ZUJDUUzx5nxr9FjB8ZkQW 4ZNw== 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=aJVHeJ+pGUaeyhH82Xlk1CVXigUjkgZJpWNOfvUWY7I=; b=XF8Eu1qyzk8okgk4HQXXYqREl79WGaGgBM5uxy12Mcvn9sGvP7IDYXQgNuif69Txs0 +4FVgRkBCE9tnrXciWlLbBilu6nGuAYe8IoFZrimAYDzjX2ltMO/U48BFsRkTbMNzy1O 6iCZo8mekN7HMwJ1ygJ7T6SZmMcBfD5t+aiUfyUo6R2c7zB1jW3SKzmUh4GuqhwFcBva VZav2VX+B26DdCpYOdsfC8rWC5A8JJZ310jG6had0MKVI7ggvbKzwC3LKhOy/1vbVOUZ kf3ZE95WzivSDJ0G2FqfTTW65LTFqp/d8XndEBG5QWYmfuYB/YDNpF0Vyrg/48j+RG4T fjPA== X-Gm-Message-State: AOAM533QJwdNnI4z2LSc0iZ02UYpJ0wr1uaehiCe2U4hEidQq45hh1qm L0SndWG1+aUMYHENp3zI+3BZmg== X-Received: by 2002:a1c:4d13:: with SMTP id o19mr4474528wmh.100.1622823168394; Fri, 04 Jun 2021 09:12:48 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h1sm10457784wmq.0.2021.06.04.09.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 09:12:43 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0ECFD1FFE7; Fri, 4 Jun 2021 16:53:22 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v16 76/99] target/arm: restrict rebuild_hflags_a64 to TARGET_AARCH64 Date: Fri, 4 Jun 2021 16:52:49 +0100 Message-Id: <20210604155312.15902-77-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210604155312.15902-1-alex.bennee@linaro.org> References: <20210604155312.15902-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.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 autolearn=ham autolearn_force=no X-Spam_action: no action 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 , qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Claudio Fontana Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Claudio Fontana this work is in preparation of making sve_zcr_len_for_el AARCH64-only. Signed-off-by: Claudio Fontana Signed-off-by: Alex Bennée --- v14 - fix merge failure with CPUARMTBflags update --- target/arm/helper-a64.h | 2 ++ target/arm/helper.h | 1 - target/arm/tcg/helper.c | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) -- 2.20.1 diff --git a/target/arm/helper-a64.h b/target/arm/helper-a64.h index 7b706571bb..c89406e656 100644 --- a/target/arm/helper-a64.h +++ b/target/arm/helper-a64.h @@ -118,3 +118,5 @@ DEF_HELPER_FLAGS_2(st2g_stub, TCG_CALL_NO_WG, void, env, i64) DEF_HELPER_FLAGS_2(ldgm, TCG_CALL_NO_WG, i64, env, i64) DEF_HELPER_FLAGS_3(stgm, TCG_CALL_NO_WG, void, env, i64, i64) DEF_HELPER_FLAGS_3(stzgm_tags, TCG_CALL_NO_WG, void, env, i64, i64) + +DEF_HELPER_FLAGS_2(rebuild_hflags_a64, TCG_CALL_NO_RWG, void, env, int) diff --git a/target/arm/helper.h b/target/arm/helper.h index 23ccb0f72f..e8df4f7625 100644 --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -94,7 +94,6 @@ DEF_HELPER_FLAGS_1(rebuild_hflags_m32_newel, TCG_CALL_NO_RWG, void, env) DEF_HELPER_FLAGS_2(rebuild_hflags_m32, TCG_CALL_NO_RWG, void, env, int) DEF_HELPER_FLAGS_1(rebuild_hflags_a32_newel, TCG_CALL_NO_RWG, void, env) DEF_HELPER_FLAGS_2(rebuild_hflags_a32, TCG_CALL_NO_RWG, void, env, int) -DEF_HELPER_FLAGS_2(rebuild_hflags_a64, TCG_CALL_NO_RWG, void, env, int) DEF_HELPER_FLAGS_5(probe_access, TCG_CALL_NO_WG, void, env, tl, i32, i32, i32) diff --git a/target/arm/tcg/helper.c b/target/arm/tcg/helper.c index 38cc7c6a3d..7136c82795 100644 --- a/target/arm/tcg/helper.c +++ b/target/arm/tcg/helper.c @@ -999,6 +999,8 @@ static CPUARMTBFlags rebuild_hflags_a32(CPUARMState *env, int fp_el, return rebuild_hflags_common_32(env, fp_el, mmu_idx, flags); } +#ifdef TARGET_AARCH64 + static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el, ARMMMUIdx mmu_idx) { @@ -1122,6 +1124,14 @@ static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el, return rebuild_hflags_common(env, fp_el, mmu_idx, flags); } +#else + +QEMU_ERROR("this should have been optimized away!") +CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el, + ARMMMUIdx mmu_idx); + +#endif /* TARGET_AARCH64 */ + static CPUARMTBFlags rebuild_hflags_internal(CPUARMState *env) { int el = arm_current_el(env); @@ -1183,6 +1193,7 @@ void HELPER(rebuild_hflags_a32)(CPUARMState *env, int el) env->hflags = rebuild_hflags_a32(env, fp_el, mmu_idx); } +#ifdef TARGET_AARCH64 void HELPER(rebuild_hflags_a64)(CPUARMState *env, int el) { int fp_el = fp_exception_el(env, el); @@ -1190,6 +1201,7 @@ void HELPER(rebuild_hflags_a64)(CPUARMState *env, int el) env->hflags = rebuild_hflags_a64(env, el, fp_el, mmu_idx); } +#endif /* TARGET_AARCH64 */ static inline void assert_hflags_rebuild_correctly(CPUARMState *env) {