From patchwork Fri Jun 29 14:53:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 140561 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp948964ljj; Fri, 29 Jun 2018 08:00:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe6stZhFwRVzouFQusB6aNTyMl+0akIzC39cW8Nt/gwCPNHJIMHJrA2ZTU160R9+U2c8uFE X-Received: by 2002:aed:3aa4:: with SMTP id o33-v6mr13823712qte.19.1530284417723; Fri, 29 Jun 2018 08:00:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530284417; cv=none; d=google.com; s=arc-20160816; b=YjH8KXwg+4W0zhZ4VheRUL7YsVqymdPb3h8u3T2fjNioiGoLIQNEEsVu+b3X/7UqmW vHLSjdOyBy7tB7+vgFgF7Y/rjHd2O/gxkBeusTgD+6bDD9nW7CBmp2/HU0Ivvda5Vphn FNBxECwqK+8jG5mdT9zHQmIpYX7PEH4sfYvNG5uSuEyu7kpDOjzZ3ap+5Gdwpve27J7m LkzBZkjsKdtWNcbLb5hdxXaFyGdOgz3sxxVVJ3Bfs/DIpqyAOYtVIHZIkgOiUQID6Zqy mHm6x6Xx/UYjXU9w6Y13yuZJtXO3z93RgZCSEKXugv4zUbL/E4BNDW3UXQFXFSdnE1wC 2Csg== 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:subject:references:in-reply-to :message-id:date:to:from:arc-authentication-results; bh=WSlwQ5kJvXqgRhgJx39PWQEGpm3BNuakcn5s6SAsvZM=; b=WReLh5Wre65iwBwa4ZwFHgcDVgUW+9Xg/rfsZKkk0KAyuN+sjiHnErjyFwgu/KOapL iML+7JYXsAvxYrxPkBD6L2GyLIu6DRq+jHg5XzCax125zv04NtgKC9TWjiMKxEYjw2fB XYuOhkeRUeIUMk70rkxfgaWep0pAcgOZl7i5mvIanlKGBcumMo7qfQLc2bpdxLpwclbC qhjZMlMxTU9D4uHDgy/y/3pvRHNYfq4qG0KUoRDtsgL9GdlIMzUciBN6ff35E0BUDV37 nM0vtrvCDDBkBHsewn5YzascxUGtDTTmqq0bTcmS4YwnmybXW9G3FzA+8bTqgZiBjovP FTrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n85-v6si2783184qke.353.2018.06.29.08.00.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 29 Jun 2018 08:00:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 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]:42797 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYusj-0004CW-5M for patch@linaro.org; Fri, 29 Jun 2018 11:00:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYumm-0007SM-4d for qemu-devel@nongnu.org; Fri, 29 Jun 2018 10:54:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYumj-0006Zd-UA for qemu-devel@nongnu.org; Fri, 29 Jun 2018 10:54:08 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:43096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYumj-0006Sf-Jn for qemu-devel@nongnu.org; Fri, 29 Jun 2018 10:54:05 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fYumi-0004bj-Bc for qemu-devel@nongnu.org; Fri, 29 Jun 2018 15:54:04 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 29 Jun 2018 15:53:10 +0100 Message-Id: <20180629145347.652-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629145347.652-1-peter.maydell@linaro.org> References: <20180629145347.652-1-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PULL 18/55] target/arm: Implement SVE prefetches X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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" From: Richard Henderson Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20180627043328.11531-13-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 21 +++++++++++++++++++++ target/arm/sve.decode | 23 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) -- 2.17.1 diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 11541b1a502..c73c3fc2151 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4303,3 +4303,24 @@ static bool trans_ST1_zprz(DisasContext *s, arg_ST1_zprz *a, uint32_t insn) cpu_reg_sp(s, a->rn), fn); return true; } + +/* + * Prefetches + */ + +static bool trans_PRF(DisasContext *s, arg_PRF *a, uint32_t insn) +{ + /* Prefetch is a nop within QEMU. */ + sve_access_check(s); + return true; +} + +static bool trans_PRF_rr(DisasContext *s, arg_PRF_rr *a, uint32_t insn) +{ + if (a->rm == 31) { + return false; + } + /* Prefetch is a nop within QEMU. */ + sve_access_check(s); + return true; +} diff --git a/target/arm/sve.decode b/target/arm/sve.decode index 7d24c2bdc4c..80b955ff840 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -794,6 +794,29 @@ LD1RQ_zprr 1010010 .. 00 ..... 000 ... ..... ..... \ LD1RQ_zpri 1010010 .. 00 0.... 001 ... ..... ..... \ @rpri_load_msz nreg=0 +# SVE 32-bit gather prefetch (scalar plus 32-bit scaled offsets) +PRF 1000010 00 -1 ----- 0-- --- ----- 0 ---- + +# SVE 32-bit gather prefetch (vector plus immediate) +PRF 1000010 -- 00 ----- 111 --- ----- 0 ---- + +# SVE contiguous prefetch (scalar plus immediate) +PRF 1000010 11 1- ----- 0-- --- ----- 0 ---- + +# SVE contiguous prefetch (scalar plus scalar) +PRF_rr 1000010 -- 00 rm:5 110 --- ----- 0 ---- + +### SVE Memory 64-bit Gather Group + +# SVE 64-bit gather prefetch (scalar plus 64-bit scaled offsets) +PRF 1100010 00 11 ----- 1-- --- ----- 0 ---- + +# SVE 64-bit gather prefetch (scalar plus unpacked 32-bit scaled offsets) +PRF 1100010 00 -1 ----- 0-- --- ----- 0 ---- + +# SVE 64-bit gather prefetch (vector plus immediate) +PRF 1100010 -- 00 ----- 111 --- ----- 0 ---- + ### SVE Memory Store Group # SVE store predicate register