From patchwork Fri May 27 18:17:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 576550 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:8607:0:0:0:0 with SMTP id bb7csp883640mab; Fri, 27 May 2022 11:34:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzq5+y8PLK/NyUyO9r7kXVNqxfMJnrW2JOGKFaGWTIkXSkaLy7ER/EV9f0yv81lmm14Byoz X-Received: by 2002:a37:bd0:0:b0:6a3:a490:aaef with SMTP id 199-20020a370bd0000000b006a3a490aaefmr17190751qkl.432.1653676456014; Fri, 27 May 2022 11:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653676456; cv=none; d=google.com; s=arc-20160816; b=dvowzYLaX4XE3Ma8P9dRDcVNxR6/dsXYZKuie+nzu5OnvA2m4kiSbcLNO6fbhimMTQ XOIPNo1F4qBu/VJS+J3rYR+lHpeXvCuBNELFiS5tgoPFEYDmGylTjBuzO5Dd2vVN94Fs pYlNuNejOP3ndU+zw6cvPd68ZlR3bWwfMIS+7Jx7rwT5B9i9yt+/GbIYCmylxmH5DxvX xXXDmSJwcQx8Wo2c8MceMj3zvy8n0r7jzGhAG4JMptGhqKXN/woB3ZhMHTzwNfx2t4ip zfKBPZV7Nwjhnvsm0IY40V21zD8TmixUoxuDOR/cZZnKMtcXuAIeU+iQMCP5Curm800F SUmw== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=I3HZX6oizcr2K30QR5msGHRUpSklskaYLnqbkE308qk=; b=ZtbCOH6651xxMCNY4u+2yiH8Mg0fliLK8ptpNiJ5BYL/3ttUQHuIqal+e0zWPKr9Vt ScYR/LN1ee7nu9fy6QUSUQcpR3LVkGhc342r7sFslhMaa7yZqW6HRCAyplgCPXkn6COr Ey+e2pUjERWXfp22o6ynpvVPWjDh4bY0Vrv2R2/Cg3hpKusahESRdPouNIf59EMP75QB OS7hH8VX/UotuXS6Gl7+REs4cQ36qQuszW8/TGWd5vr3asco+pRx3zQuu3zF7KZKMiD9 sYqT+yKt4z/4NAwpl78RIyItVVZ10Viezxx/DetrD0aTVSwlFBg+/ecMH6xj4ZqQFOTZ ypEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vNuKBOr6; 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 v63-20020a37dc42000000b006a329b2f8aesi3101602qki.515.2022.05.27.11.34.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 27 May 2022 11:34:16 -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=vNuKBOr6; 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]:50518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuemt-0003Fj-JO for patch@linaro.org; Fri, 27 May 2022 14:34:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nueYM-00065j-EZ for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:14 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:40851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nueYJ-0003UM-4m for qemu-devel@nongnu.org; Fri, 27 May 2022 14:19:14 -0400 Received: by mail-pf1-x42f.google.com with SMTP id i18so4963231pfk.7 for ; Fri, 27 May 2022 11:19:10 -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:mime-version :content-transfer-encoding; bh=I3HZX6oizcr2K30QR5msGHRUpSklskaYLnqbkE308qk=; b=vNuKBOr6klukZhNBHvvEaobMx59LA2gWiiSOLluP4H3b1bAHHMoqD22wC4KKjLxwbi mv6tj+z19+OE/bkezVYMYEYW/8PZyJOnHds+lUbsLwLcOv7Ssp1oMU+OLKsa3Ciqhhqe E+bSt6sQuJPCOn79I5Pi2lYXKNMBCD/POD5fjUapocTxh8VZHErX+4dJRvPlz/RFAzyi puUDah7OvcBXVECLb7bHIuPAjfBs5EvdjaqFIx0fCDqYmk8PacuV0Lqh6OrWA3ZlCHqa Ufls78+JzWkRVroXt7yS5pEfuXYwLTHVaux0c6VBBW1SKvdm69vZSnw9WGNMTR04Zwyl NrGg== 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:mime-version :content-transfer-encoding; bh=I3HZX6oizcr2K30QR5msGHRUpSklskaYLnqbkE308qk=; b=yy/NV26zqfRYxjRwNTPx0DGF0B0p6oDdkA/lHHsL+74LqJRo3YQHuSksTlcO422yCR dknlkt/DXafSVRhCBeKhgsK2GOC8R8+f9i5j7CB7bN+/oyaQIgRr9Xz0zsMas33rtOfx UBlQkgSBOYNeCwzOE35wyJyYoIhu8bBAnaN/tYk2+T5QHNnBp9y/l5pQN5jWjvFOQbXE 0rUuHbFwklMNXs1o6m5twjNIGzptEBuDjeN0RGetnJZVoxpkFJG3AF0Tqt3g2Xe/9ml7 Ne64t0XuAGR/QzNSWdpr/vAy2vPNrnPl/zjJq6ShMNLNGmwcnTneQHqgYblRtCAN/yWE j8cg== X-Gm-Message-State: AOAM533Se+0DzXavFsOcko3taDP8I+F6UConOE7RwIP0Hiv1U6F4Mr2j 2nj8xUGmQEF+srykYdb4taXyftaJqe1Y+A== X-Received: by 2002:a63:d012:0:b0:3fb:b3d6:122 with SMTP id z18-20020a63d012000000b003fbb3d60122mr2882250pgf.142.1653675549082; Fri, 27 May 2022 11:19:09 -0700 (PDT) Received: from stoup.. (174-21-71-225.tukw.qwest.net. [174.21.71.225]) by smtp.gmail.com with ESMTPSA id t5-20020a17090ae50500b001deb3cbd8f1sm1911612pjy.27.2022.05.27.11.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 May 2022 11:19:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 000/114] target/arm: Rewrite sve feature tests Date: Fri, 27 May 2022 11:17:13 -0700 Message-Id: <20220527181907.189259-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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" There are SME instructions within the SVE encoding space, and technically SME does not require SVE. Thus we need to move: if (!dc_isar_feature(aa64_sve, s) || !disas_sve(s, insn)) { into each individual instruction. Use a macro trick similar to what we've been using over in target/ppc/. r~ Richard Henderson (114): target/arm: Introduce TRANS, TRANS_FEAT target/arm: Move null function and sve check into gen_gvec_ool_zz target/arm: Use TRANS_FEAT for gen_gvec_ool_zz target/arm: Move null function and sve check into gen_gvec_ool_zzz target/arm: Introduce gen_gvec_ool_arg_zzz target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzz target/arm: Use TRANS_FEAT for do_sve2_zzz_ool target/arm: Move null function and sve check into gen_gvec_ool_zzzz target/arm: Use TRANS_FEAT for gen_gvec_ool_zzzz target/arm: Introduce gen_gvec_ool_arg_zzzz target/arm: Use TRANS_FEAT for do_sve2_zzzz_ool target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzzz target/arm: Rename do_zzxz_ool to gen_gvec_ool_arg_zzxz target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zzxz target/arm: Use TRANS_FEAT for do_sve2_zzz_data target/arm: Use TRANS_FEAT for do_sve2_zzzz_data target/arm: Use TRANS_FEAT for do_sve2_zzw_data target/arm: Use TRANS_FEAT for USDOT_zzzz target/arm: Move null function and sve check into gen_gvec_ool_zzp target/arm: Introduce gen_gvec_ool_arg_zpz target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpz target/arm: Use TRANS_FEAT for do_sve2_zpz_data target/arm: Rename do_zpzi_ool to gen_gvec_ool_arg_zpzi target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzi target/arm: Move null function and sve check into gen_gvec_ool_zzzp target/arm: Introduce gen_gvec_ool_arg_zpzz target/arm: Use TRANS_FEAT for gen_gvec_ool_arg_zpzz target/arm: Use TRANS_FEAT for do_sve2_zpzz_ool target/arm: Merge gen_gvec_fn_zz into do_mov_z target/arm: Move null function and sve check into gen_gvec_fn_zzz target/arm: Rename do_zzz_fn to gen_gvec_fn_arg_zzz target/arm: More use of gen_gvec_fn_arg_zzz target/arm: Use TRANS_FEAT for gen_gvec_fn_arg_zzz target/arm: Use TRANS_FEAT for do_sve2_fn_zzz target/arm: Use TRANS_FEAT for RAX1 target/arm: Introduce gen_gvec_fn_arg_zzzz target/arm: Use TRANS_FEAT for do_sve2_zzzz_fn target/arm: Introduce gen_gvec_fn_zzi target/arm: Use TRANS_FEAT for do_zz_dbm target/arm: Hoist sve access check through do_sel_z target/arm: Introduce gen_gvec_fn_arg_zzi target/arm: Use TRANS_FEAT for do_sve2_fn2i target/arm: Use TRANS_FEAT for do_vpz_ool target/arm: Use TRANS_FEAT for do_shift_imm target/arm: Introduce do_shift_zpzi target/arm: Use TRANS_FEAT for do_shift_zpzi target/arm: Use TRANS_FEAT for do_zpzzz_ool target/arm: Move sve check into do_index target/arm: Use TRANS_FEAT for do_index target/arm: Use TRANS_FEAT for do_adr target/arm: Use TRANS_FEAT for do_predset target/arm: Use TRANS_FEAT for RDFFR, WRFFR target/arm: Use TRANS_FEAT for do_pfirst_pnext target/arm: Use TRANS_FEAT for do_EXT target/arm: Use TRANS_FEAT for do_perm_pred3 target/arm: Use TRANS_FEAT for do_perm_pred2 target/arm: Move sve zip high_ofs into simd_data target/arm: Use gen_gvec_ool_arg_zzz for do_zip, do_zip_q target/arm: Use TRANS_FEAT for do_zip, do_zip_q target/arm: Use TRANS_FEAT for do_clast_vector target/arm: Use TRANS_FEAT for do_clast_fp target/arm: Use TRANS_FEAT for do_clast_general target/arm: Use TRANS_FEAT for do_last_fp target/arm: Use TRANS_FEAT for do_last_general target/arm: Use TRANS_FEAT for SPLICE target/arm: Use TRANS_FEAT for do_ppzz_flags target/arm: Use TRANS_FEAT for do_sve2_ppzz_flags target/arm: Use TRANS_FEAT for do_ppzi_flags target/arm: Use TRANS_FEAT for do_brk2, do_brk3 target/arm: Use TRANS_FEAT for MUL_zzi target/arm: Reject dup_i w/ shifted byte early target/arm: Reject add/sub w/ shifted byte early target/arm: Reject copy w/ shifted byte early target/arm: Use TRANS_FEAT for ADD_zzi target/arm: Use TRANS_FEAT for do_zzi_sat target/arm: Use TRANS_FEAT for do_zzi_ool target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz target/arm: Use TRANS_FEAT for FMMLA target/arm: Move sve check into gen_gvec_fn_ppp target/arm: Implement NOT (prediates) alias target/arm: Use TRANS_FEAT for SEL_zpzz target/arm: Use TRANS_FEAT for MOVPRFX target/arm: Use TRANS_FEAT for FMLA target/arm: Use TRANS_FEAT for BFMLA target/arm: Rename do_zzz_fp to gen_gvec_ool_fpst_arg_zzz target/arm: Use TRANS_FEAT for DO_FP3 target/arm: Use TRANS_FEAT for FMUL_zzx target/arm: Use TRANS_FEAT for FTMAD target/arm: Move null function and sve check into do_reduce target/arm: Use TRANS_FEAT for do_reduce target/arm: Use TRANS_FEAT for FRECPE, FRSQRTE target/arm: Expand frint_fns for MO_8 target/arm: Rename do_zpz_ptr to gen_gvec_ool_fpst_arg_zpz target/arm: Move null function and sve check into do_frint_mode target/arm: Use TRANS_FEAT for do_frint_mode target/arm: Use TRANS_FEAT for FLOGB target/arm: Use TRANS_FEAT for do_ppz_fp target/arm: Rename do_zpzz_ptr to gen_gvec_fpst_arg_zpzz target/arm: Use TRANS_FEAT for gen_gvec_fpst_arg_zpzz target/arm: Use TRANS_FEAT for FCADD target/arm: Introduce gen_gvec_fpst_zzzzp target/arm: Use TRANS_FEAT for gen_gvec_fpst_zzzzp target/arm: Move null function and sve check into do_fp_imm target/arm: Use TRANS_FEAT for DO_FP_IMM target/arm: Use TRANS_FEAT for DO_FPCMP target/arm: Remove assert in trans_FCMLA_zzxz target/arm: Use TRANS_FEAT for FCMLA_zzxz target/arm: Use TRANS_FEAT for do_narrow_extract target/arm: Use TRANS_FEAT for do_shll_tb target/arm: Use TRANS_FEAT for do_shr_narrow target/arm: Use TRANS_FEAT for do_FMLAL_zzzw target/arm: Use TRANS_FEAT for do_FMLAL_zzxw target/arm: Add sve feature check for remaining trans_* functions target/arm: Remove aa64_sve check from before disas_sve target/arm/translate.h | 11 + target/arm/sve.decode | 57 +- target/arm/sve_helper.c | 6 +- target/arm/translate-a64.c | 2 +- target/arm/translate-sve.c | 5367 ++++++++++++++---------------------- 5 files changed, 2058 insertions(+), 3385 deletions(-) Reviewed-by: Peter Maydell