From patchwork Wed Jun 27 04:33:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 140103 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp390558ljj; Tue, 26 Jun 2018 21:45:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdTAr3h0DDZtV0sN//C3prHWR1mGzWGNjKXJbiiT4VuPxtgCsqNg0da1vUtJEWx2BFqCKKi X-Received: by 2002:ac8:37c8:: with SMTP id e8-v6mr2473312qtc.364.1530074754218; Tue, 26 Jun 2018 21:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530074754; cv=none; d=google.com; s=arc-20160816; b=xq1Tt4rDeYr0FLHfssHKgWsxpc4CFL5TllETRiKEk+ifQelcfo9riryIOxGTphMBQ8 TAyS7SMEiPKO44kY7Cj17TUEgG/MddGiALVLPZmTv4K/ShUqbv8HhbFc8xMpU93HCDFm yW9YP5EKIUI70mNuexyxLJ4HqR7JMP/QDhLyZZwWkhdZ1DYVuis9Yu1CucKb6pAqxDZr QObf/47slujeg85v3uyrRdTDuiclJVBcYC1JY2rhdCgBcMF5MTA7W5Pf54XE2lBInj5e 67gs5I8mPhX3TVtmovEcO6USrlUqOnROw2Sp+MZ466d3zbPYAnKBilL+Pj0dJyh8hmS2 fliA== 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=9Lq4027RZ73q8aO2yN77xs6Fxbmm8ORU6JI1DqiGp0U=; b=Khs6ZL76lHVNd0PBi6EFgTdigYK0vZ3fjs8+uITH0fgDnJwxfjaYxbuBxCWbXVr/IX yQyask+T6JE/LYs/jenBvfbMKEdlc0HdK7VaknldsocISvg0I284JvufVKaU1xWFSQBV mq+EWuKrNvxJd6hnSeAYeUuFVKzwKt1aaYGEe9lzVWKB0Q1vnt3nK5hxL5/l3hsvfGjz 880ABZ5MhfHCZzeVzVoGVpmawJEse8x8CU3JR75aFzeDLsYoEus9VlryaTr0+I8q2nlh QYeep5NRjsOxFvax1C1mYOPazsGeUVlf+jAs0hTJJBzywZSzdVSDKFD7QpL8dH+1oGbp jsKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Dbl3o2tV; 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 7-v6si3030865qtc.277.2018.06.26.21.45.54 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 26 Jun 2018 21:45:54 -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=Dbl3o2tV; 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]:56547 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY2L3-00052y-LX for patch@linaro.org; Wed, 27 Jun 2018 00:45:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fY29P-0004ER-Nh for qemu-devel@nongnu.org; Wed, 27 Jun 2018 00:33:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fY29N-0000TH-KL for qemu-devel@nongnu.org; Wed, 27 Jun 2018 00:33:51 -0400 Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]:40033) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fY29N-0000RR-B3 for qemu-devel@nongnu.org; Wed, 27 Jun 2018 00:33:49 -0400 Received: by mail-pf0-x236.google.com with SMTP id z24-v6so385454pfe.7 for ; Tue, 26 Jun 2018 21:33:49 -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=9Lq4027RZ73q8aO2yN77xs6Fxbmm8ORU6JI1DqiGp0U=; b=Dbl3o2tV66yNcaS+my+QzlfieJfmnnfJGi+4wVuNMiIGfUVB4KJhYZuzR94+CkY7RA qiCJIRxkHkTgaTQucPbDW0tHTQOCoS3PMaPWmPoxt5SZPHLUqdaRVHnSJbDZsu1nsMoG fJx+S7z8sbq0frfsS2iPZ6/CiZ2/Nu7+IEB6g= 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=9Lq4027RZ73q8aO2yN77xs6Fxbmm8ORU6JI1DqiGp0U=; b=dYsNTgr0JBacYoXYaZZXMs+2AwEm7UKE7qy01i5ePD3R/UlRAr+FOZ385NbNpk8B7A vHoFApuP3fw322jfDamUyVsNWBaWOpW7yY33cQKgWtr2pLKenq+ijIfRzWxTzWBvYo0u KsrL6AdBl5xw6+Mh2GBUNxHRykBq+L1vrD23ymv81GBTz91ThfZYvJP2Z5NSg3b70wNZ lgoFcZknjkw7CMRBRvKRIacoxdJlzdMkEFlk/5LEqVHWjnRgpdo8t/1wu8WETrRMPkVb EnFE/sPn5GGqTHmdexQGTCQGBKj530ti+WPTXRyyW9zJdprYBKHI5kq02/QNipEinYf5 B4PQ== X-Gm-Message-State: APt69E1eoL12Aqtk0EKxo1DphRRAJiVvzS4L33EcT/E+b4zFeyCuSwNB 4WIBOQqncbHotQVvjAu87TX7IFVJqfI= X-Received: by 2002:a62:e70e:: with SMTP id s14-v6mr4270998pfh.131.1530074027951; Tue, 26 Jun 2018 21:33:47 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id p20-v6sm4577638pff.90.2018.06.26.21.33.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jun 2018 21:33:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 26 Jun 2018 21:33:05 -0700 Message-Id: <20180627043328.11531-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180627043328.11531-1-richard.henderson@linaro.org> References: <20180627043328.11531-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::236 Subject: [Qemu-devel] [PATCH v6 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, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- 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 65da3e633f..27854e0042 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 7d24c2bdc4..80b955ff84 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