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: 932483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="PiwcLZ7B"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41B4pg35VYz9s3R for ; Thu, 21 Jun 2018 12:07:39 +1000 (AEST) Received: from localhost ([::1]:52544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fVp0b-0005SG-2m for incoming@patchwork.ozlabs.org; Wed, 20 Jun 2018 22:07:37 -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-Google-Smtp-Source: ADUXVKKpMH70IGO2dAjGaJxKo/Gv/uiXJShJ/u2BRkW75JrowAVyrXU2fSxHk97v4dKSGrs6rkLeig== 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/arm/translate-sve.c | 21 +++++++++++++++++++++ target/arm/sve.decode | 23 +++++++++++++++++++++++ 2 files changed, 44 insertions(+) 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