From patchwork Thu Jun 21 01:53:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 139417 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp1479556lji; Wed, 20 Jun 2018 19:09:23 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKM2ZdEb4keE5Ybo1nNuyWjvOr7wKu0O6fz0yXBuA+Oti2EjRVF6p2L3oyfW3JijeI/ibNC X-Received: by 2002:aed:3b3b:: with SMTP id p56-v6mr21328002qte.372.1529546963523; Wed, 20 Jun 2018 19:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529546963; cv=none; d=google.com; s=arc-20160816; b=mlvum8ZrWhUOYkK/IeU1ViN4KJzNgssM+9C+qjU2kybUGWyPtp3T1Z/BMs/vktceZY jG/2M1qgJxxVL3id8IDy/CIjeo8qtoXTRQjsCGcUX7gT2Kqnv4ZuXcHzHNRh7u0rrOPC 2e0paCBkeFPnktkWkBEuUEIRmXTA/j7A/qOdFD/MYf+0NsdT68LGiSAo/D0x425PWvaV gNBDmGrD5SizemlzuAHUuvxeg/JQptGPiPS64/dmWX6L/rQg75+N0fwyU6TjB1FqlvKz m0PXAo7hyHsRVYLLUow9n3owMXSq87TQpGHFaI3deAjhQTbIC7AaMcaB4Z3DdVp0V+du oLgQ== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=ABjeW7FWo1HVKOTk5GV1YLP/uN+2VusXjD7Yv5Umy/k=; b=WOvQg8v7UsBFkTdrm0chxuUdre+GN7l4hw9fyANechflrJR1dxPXVOa3TOVmibvE5X TQY/VA+WjQVl1UPwXoWpfiGxsXwdPMbneN43I6bqcpNXJAh6/kxmw6C6iRUbfFxghN3+ jciu7J463ErNFS531u6X3G0s3e9SvzhpZq1P26bA72R5I519uOhFEunLmrQm8gjvVkjL //o0PeKZi9sgPU1Pe8BNJpJKnJGbR+Ujl8HIjpq8SOZKWzbz4xG4jALpOOGKmR5oERZ5 0er7592HxmHdXxUhQleU6Fa6YVpcRCLaIyF+geZbE6EctlpamXSiKb7b+XKIaqomWVsk vg9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PiwcLZ7B; 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 l38-v6si3808292qta.93.2018.06.20.19.09.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Jun 2018 19:09:23 -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; dkim=fail header.i=@linaro.org header.s=google header.b=PiwcLZ7B; 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]:52553 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVp2I-0007AV-VM for patch@linaro.org; Wed, 20 Jun 2018 22:09:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVonu-0004P9-JT for qemu-devel@nongnu.org; Wed, 20 Jun 2018 21:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fVons-00036p-U6 for qemu-devel@nongnu.org; Wed, 20 Jun 2018 21:54:30 -0400 Received: from mail-pf0-x229.google.com ([2607:f8b0:400e:c00::229]:33683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fVons-00036R-NH for qemu-devel@nongnu.org; Wed, 20 Jun 2018 21:54:28 -0400 Received: by mail-pf0-x229.google.com with SMTP id b17-v6so694612pfi.0 for ; Wed, 20 Jun 2018 18:54:28 -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; bh=ABjeW7FWo1HVKOTk5GV1YLP/uN+2VusXjD7Yv5Umy/k=; b=PiwcLZ7BYFg6q1immBv7qlBb5cLdO0M7fxvQmHG1CcOQd10qYjR+XlzSD9LIkHdXI+ sk9OeaWUsMHmpmeyB/oEonlBg5bJ+lYfHlPEGlGHGgqvrxc9V5TQIjRIa0a/djSxvK9U SUAbWQVRlqZqEwI20DXbyJ7LyzQilj5xSnlnE= 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; bh=ABjeW7FWo1HVKOTk5GV1YLP/uN+2VusXjD7Yv5Umy/k=; b=W2V0BaHuSg//4FjNhjnOaqltCKWD3uQZFqIRJ2IOxxrXqN9OPdGEpd7Y+WoRk/CE8p Tu+nkIhY8l9KQ+yO61x9II+5nBFYeaKPq7ddUF0Hj3DJsnDmB8oA1W4OvFU08xsx+hGI HfMDdfBEly95zEXBpyHdzBVU19bxkp6c8kqBHyS63U3VtC+QuLeSN9ZsSkkcLUxG8Ehx +wBibQactB3rmSqtYLSSKtSbaZv+dwdjdveePB0vJrjp1MciFcvceJyXAzgFCT5G/nNp 8L8Sv38srSe2Lj1sk8hi+3uB6DNmq/TIyBuwvr6LhgvEBnIELfBi4Y89w7aNbrDnVjzJ ogfg== X-Gm-Message-State: APt69E2xBhi4dKlX//7g0p+Swf8kG+j1Dt2Zd+9o/k7Gs/vv/wPiRQ4y XKpMnWqHe41pBoLXSsNmVQ9C/rNYfes= X-Received: by 2002:a65:5686:: with SMTP id v6-v6mr20906014pgs.141.1529546067428; Wed, 20 Jun 2018 18:54:27 -0700 (PDT) Received: from cloudburst.twiddle.net (mta-98-147-121-51.hawaii.rr.com. [98.147.121.51]) by smtp.gmail.com with ESMTPSA id a27-v6sm6187946pfc.18.2018.06.20.18.54.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 18:54:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 20 Jun 2018 15:53:36 -1000 Message-Id: <20180621015359.12018-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180621015359.12018-1-richard.henderson@linaro.org> References: <20180621015359.12018-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::229 Subject: [Qemu-devel] [PATCH v5 12/35] 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: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 21 +++++++++++++++++++++ target/arm/sve.decode | 23 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) -- 2.17.1 Reviewed-by: Peter Maydell diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 6e1907cedd..c054e3268b 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -4302,3 +4302,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 2ca0fd85e6..a20f98b70c 100644 --- a/target/arm/sve.decode +++ b/target/arm/sve.decode @@ -793,6 +793,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