From patchwork Fri Jul 8 15:15:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 588522 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:bb16:0:0:0:0 with SMTP id jd22csp759803mab; Fri, 8 Jul 2022 08:25:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1taPrIekhjMeP3tlj1tPdadGoiFS7iBYOH0tdfjAD5tNLsUpLST/dd91qVisMw+nGBv4//f X-Received: by 2002:ad4:5ba3:0:b0:473:1b5:e8ba with SMTP id 3-20020ad45ba3000000b0047301b5e8bamr3037940qvq.49.1657293939313; Fri, 08 Jul 2022 08:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657293939; cv=none; d=google.com; s=arc-20160816; b=hp8GjSB3M7YflVCZ6nfw2KKKCKjgkrtMMYGU6+CfuHeAa3x675xyfHkRaSwemDaKuk aZbCOcusAJgISVXMs4v+PlhNrgtWYplhodyghYFTqGTHDrfLnA0PLqDTnObwqDAtdmXo YXK6Kk9fpgGukIoa8+yrGguyTB47pgJHdOuCcsJuF74ElqiPWp32mWeonSay1QDvf04N E2IyuMPUkAmoAmRvKzHFiSdhPVWgZt8fEGNfQzVumynB7QGCfK4rNHEhUUaoCwZ0yaNz wGze6k049V0ocfK5yE4LhfZfCvd7/c12OWwQZ+eY3PsQnroCSpOL5YqjxKxjy7RrbZrC liag== 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=EEUaOkhoazNVf18b04XDY+SiXA3h6+AppArsj54fhkI=; b=myv10guKyKgM+b93eQdbNTd3pVXwpZzWiiOGL+16tN7v8lq5Z6DwEtnKy969i2DrSL x+5h2MCD2Tq2Kw9a09U+RsRFF7a1OzgitDQensGRp4Sl33s5N2Tv9G1yH/8rFa6SLNYd 60p3rN+uPZOWgNx748l3MLhOce9dHaaORBFTWhl8GN5N8DZWd54WWkS+qBMAyabC1E8y zQ7b2Pwi/e7x0yeMwTkCNlqsG7ZThBvhFiGPb2LXDgrkl1X6uD9LelOyKv4cnKrsk6a6 m/+Ns+akItznthNkbMFKRhVNg+TgyYfVT8/wp4a+zoAtvkJ3UUgbG0cqkQF+7Ek6IN31 eqKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yiW3pQ1R; 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 x8-20020ac85f08000000b0031d36fa92b4si14431098qta.476.2022.07.08.08.25.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Jul 2022 08:25:39 -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=yiW3pQ1R; 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]:41520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9prO-0002fs-TZ for patch@linaro.org; Fri, 08 Jul 2022 11:25:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9piW-0002Xx-N0 for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:16:29 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]:54955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9piR-0002Ec-7k for qemu-devel@nongnu.org; Fri, 08 Jul 2022 11:16:24 -0400 Received: by mail-pj1-x102f.google.com with SMTP id s21so13754592pjq.4 for ; Fri, 08 Jul 2022 08:16:22 -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=EEUaOkhoazNVf18b04XDY+SiXA3h6+AppArsj54fhkI=; b=yiW3pQ1RIvcf7Phuds5BBKVzqbum3+ox4rTtGLkPCzm4LushjfdL1X6EBUjFJIeCxS xBoDglVXFb5BigURyKq22Ngh07WVYQCYS7vjy+HSejB7pIKxiSGgwZuLyWnIMV8r6qqU HJNasp3KVx/ktpwWsWdemOG+7nlMVgdLH+o50rP7kgDi5SZundv0FO7trdZ3oxorz2/o XzMUFPOu6ENl0I6LNKlAdinm2c79POy9gTNoFmt98cl44bBQTgjbwsTzeFvzkV1vseC+ zmbKnDlEwfNNyCc5vGXuygLFEWk0x5hcMv5U/P5m296M9/DJBEhGQC6lCOMBYcmmzTnd RpgA== 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=EEUaOkhoazNVf18b04XDY+SiXA3h6+AppArsj54fhkI=; b=XxtpxSkD1H4hEfLjhA15VIqlhqW3zkKjdLIQM9HLp1Z/cKHDRtmmR8B7GVdvb60I61 bdvSIbvS1jH8+UlBWm+lSaMrJNGUar/anS2EbY4twB19B2zMBEP/KzoYi3dicCh6jYmc l5q+XxDNNc/yWTRxeHYCbBt/lOiGShIyPIfMFmSJZm/FM80o4ypCU11Hd81RaF4jIOu2 qz6FOd9UWI2tQf4QgrhbJ7QiVJx4xpE8S+BBSiI6NB5R+TPaqPKC3SVPESFYI75rWfDF oGO6OKL/5W+QMbFTHC9LF4jGUVdaKDMSGA/QhOqTfmUdj5cZE5pbCkmtcDehx/5eY7S2 WtGQ== X-Gm-Message-State: AJIora/QULwlvJLkgz28J1finVYXXeecHBlAWVGFBBI0imbR4acGVlZg +vhuY9gVmLMudR1ND6J5zERUdu/2oRvx0Wxc X-Received: by 2002:a17:902:b218:b0:168:de55:dfba with SMTP id t24-20020a170902b21800b00168de55dfbamr4272859plr.134.1657293381856; Fri, 08 Jul 2022 08:16:21 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id n17-20020a056a0007d100b0051bada81bc7sm29085774pfu.161.2022.07.08.08.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 08:16:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v6 12/45] target/arm: Mark gather prefetch as non-streaming Date: Fri, 8 Jul 2022 20:45:07 +0530 Message-Id: <20220708151540.18136-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708151540.18136-1-richard.henderson@linaro.org> References: <20220708151540.18136-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102f.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" Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. In this case, introduce PRF_ns (prefetch non-streaming) to handle the checks. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 3 --- target/arm/sve.decode | 10 +++++----- target/arm/translate-sve.c | 11 +++++++++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/target/arm/sme-fa64.decode b/target/arm/sme-fa64.decode index 1acc3ae080..7d4c33fb5b 100644 --- a/target/arm/sme-fa64.decode +++ b/target/arm/sme-fa64.decode @@ -59,10 +59,7 @@ FAIL 0001 1110 0111 1110 0000 00-- ---- ---- # FJCVTZS # --11 1100 --1- ---- ---- ---- ---- --10 # Load/store FP register (register offset) # --11 1101 ---- ---- ---- ---- ---- ---- # Load/store FP register (scaled imm) -FAIL 1000 010- -00- ---- 111- ---- ---- ---- # SVE 32-bit gather prefetch (vector+imm) -FAIL 1000 0100 0-1- ---- 0--- ---- ---- ---- # SVE 32-bit gather prefetch (scalar+vector) FAIL 1010 010- ---- ---- 011- ---- ---- ---- # SVE contiguous FF load (scalar+scalar) FAIL 1010 010- ---1 ---- 101- ---- ---- ---- # SVE contiguous NF load (scalar+imm) FAIL 1010 010- -01- ---- 000- ---- ---- ---- # SVE load & replicate 32 bytes (scalar+scalar) FAIL 1010 010- -010 ---- 001- ---- ---- ---- # SVE load & replicate 32 bytes (scalar+imm) -FAIL 1100 010- ---- ---- ---- ---- ---- ---- # SVE 64-bit gather load/prefetch diff --git a/target/arm/sve.decode b/target/arm/sve.decode index a54feb2f61..908643d7d9 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -1183,10 +1183,10 @@ LD1RO_zpri 1010010 .. 01 0.... 001 ... ..... ..... \ @rpri_load_msz nreg=0 # SVE 32-bit gather prefetch (scalar plus 32-bit scaled offsets) -PRF 1000010 00 -1 ----- 0-- --- ----- 0 ---- +PRF_ns 1000010 00 -1 ----- 0-- --- ----- 0 ---- # SVE 32-bit gather prefetch (vector plus immediate) -PRF 1000010 -- 00 ----- 111 --- ----- 0 ---- +PRF_ns 1000010 -- 00 ----- 111 --- ----- 0 ---- # SVE contiguous prefetch (scalar plus immediate) PRF 1000010 11 1- ----- 0-- --- ----- 0 ---- @@ -1223,13 +1223,13 @@ LD1_zpiz 1100010 .. 01 ..... 1.. ... ..... ..... \ @rpri_g_load esz=3 # SVE 64-bit gather prefetch (scalar plus 64-bit scaled offsets) -PRF 1100010 00 11 ----- 1-- --- ----- 0 ---- +PRF_ns 1100010 00 11 ----- 1-- --- ----- 0 ---- # SVE 64-bit gather prefetch (scalar plus unpacked 32-bit scaled offsets) -PRF 1100010 00 -1 ----- 0-- --- ----- 0 ---- +PRF_ns 1100010 00 -1 ----- 0-- --- ----- 0 ---- # SVE 64-bit gather prefetch (vector plus immediate) -PRF 1100010 -- 00 ----- 111 --- ----- 0 ---- +PRF_ns 1100010 -- 00 ----- 111 --- ----- 0 ---- ### SVE Memory Store Group diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index b23c6aa0bf..bbf3bf2119 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -5971,6 +5971,17 @@ static bool trans_PRF_rr(DisasContext *s, arg_PRF_rr *a) return true; } +static bool trans_PRF_ns(DisasContext *s, arg_PRF_ns *a) +{ + if (!dc_isar_feature(aa64_sve, s)) { + return false; + } + /* Prefetch is a nop within QEMU. */ + s->is_nonstreaming = true; + (void)sve_access_check(s); + return true; +} + /* * Move Prefix *