From patchwork Sat Feb 17 18:22:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 128675 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1817035ljc; Sat, 17 Feb 2018 10:26:45 -0800 (PST) X-Google-Smtp-Source: AH8x226dyAs+gXjv2lLEdZTgnu5zhjJaWEqd4sPq5/3nIvbsTiblQHqQ6yGrvROpxSOxQsqwda+6 X-Received: by 10.129.122.72 with SMTP id v69mr7547162ywc.17.1518892005824; Sat, 17 Feb 2018 10:26:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518892005; cv=none; d=google.com; s=arc-20160816; b=o35W0BJtLtmISPArqBeGLm8i+XXaUXLd/hA0GMlHn5R3HFxDZLTVSZhEbZ5pM7PH5c 2c07KIKdgjTJH3q7zQsQVbMlIFPEwhN6NesYWF5AjHI6Gime1mZhwKCx07xq+iGUHTRB EZ2pcRe7TnCpQrK4WqUDh4eKTvwJo8RR4E5oTbpIInoUTthf29o9T/R+B323VSseGeTW 02ffqRKUl55+ZM6z4sxmSXTWWDjozKZ4A9VKBnukkKh+8UnwjN4m+28fw5J5VFEOnBKN uUIqdQAuLbyCHXyGWqI2/kIXy2ppo4lY4trJm7d3euKAgr642pFU/BrxBjQSZWojlB1/ Ae/w== 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:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=Ozq4WtqLivT5jWxg2n96ncRQlgTHTuUgA5WefsvrPFU=; b=oaXjC0JOjDoq9UyK3p2tXcK+KOZrgbtZNhksaS9zn62P7UhwHMV7p0gwzSESHM5r3C 2mQKHRdawCmNYMFm4DisAtu+R1qZTRj5jODUvzTvTbkl4bs0HiB1ta3LEaPQC4CduMSW N/FLvIeYyyCddDl/MPW9JDZeMYM8cEwyG3Ahs6bYn60O3Im+1TUiNemFghjn9AjuZYwM Vi5MW72gBTs8UrSuDR+r2HTWOgjhnlJxDg6KLgSJo9Ob7Mc4TDfD/i8YI1W4oYuyvaKs veb+12nZ75R1M1VYhFt9hdcnTHbKH1maN7oRKKVHWyY6tu6BFscrh1VTTHxXbE43As/f koZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NFVOk4hN; 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 q6si3208284ybf.337.2018.02.17.10.26.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 17 Feb 2018 10:26:45 -0800 (PST) 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=NFVOk4hN; 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]:48062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en7C9-00025w-6t for patch@linaro.org; Sat, 17 Feb 2018 13:26:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1en791-0008WA-PP for qemu-devel@nongnu.org; Sat, 17 Feb 2018 13:23:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1en78y-0001QF-ER for qemu-devel@nongnu.org; Sat, 17 Feb 2018 13:23:31 -0500 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:38164) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1en78y-0001Pu-5q for qemu-devel@nongnu.org; Sat, 17 Feb 2018 13:23:28 -0500 Received: by mail-pl0-x241.google.com with SMTP id h10so3438734plt.5 for ; Sat, 17 Feb 2018 10:23:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=Ozq4WtqLivT5jWxg2n96ncRQlgTHTuUgA5WefsvrPFU=; b=NFVOk4hN14V54rAn0lS8oIiUImXT2MMeTmNligt11jZRuDVZw76s0goU8wJE2RlSfA t5T5XBPvAYMQCA8mLI9VxGCvgKuvSTMjBi0WgGhHevYMIEEOgjLgve3TAlgiFCpQdA8D CmeV0kd1Ct0aE02D9uxwKsVJmyqBORyespouk= 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; bh=Ozq4WtqLivT5jWxg2n96ncRQlgTHTuUgA5WefsvrPFU=; b=Fi3f7Ems0gVG7SuYJwKtSjAWqnPgM7klR0NNeLnNxX2JCbfIplz09NJmVKr3ZVXu8D 30GlYBhisp2nKAqH1SAjFW4gGkBOd5lTPI9ojC0sHfLUGaJP2cZjtUwyH3BuTn0Nn1vb 56CtlKk+wzV3J4wKXj8q3smYwITkQW+4DFj9FbyuAkwcZxYDiszMVcLtdHBNyVxkYN70 st9qKtEh+v4QEfHRaqDUzgxq66IL28mAzcDbEBRqDoAg/eo1ROykPlj7qaMYzBw5dWWP wNcnxwe4BfxR93KX4GYBUubWW7BVb4JJiD1nsc5fYQocKY8a5+A8UzuZgOlW4WB44m1l Jddg== X-Gm-Message-State: APf1xPB+CDTGeIZ2LdGQzoQUljBYXcs6wnqihLgk23BDpy8rEKVz2DI3 +gS+eAUaphksMyX4v5waf4XACj8XVgc= X-Received: by 2002:a17:902:b488:: with SMTP id y8-v6mr8853476plr.432.1518891806645; Sat, 17 Feb 2018 10:23:26 -0800 (PST) Received: from cloudburst.twiddle.net ([50.0.192.64]) by smtp.gmail.com with ESMTPSA id h15sm13466712pfi.56.2018.02.17.10.23.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 17 Feb 2018 10:23:25 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 17 Feb 2018 10:22:16 -0800 Message-Id: <20180217182323.25885-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::241 Subject: [Qemu-devel] [PATCH v2 00/67] target/arm: Scalable Vector Extension 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: qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is 99% of the instruction set. There are a few things missing, notably first-fault and non-fault loads (even these are decoded, but simply treated as normal loads for now). The patch set is dependant on at least 3 other branches. A fully composed tree is available as git://github.com/rth7680/qemu.git tgt-arm-sve-7 There are a few checkpatch errors due to macros and typedefs, but nothing that isn't be obvious as a false positive. This is able to run SVE enabled Himeno and LULESH benchmarks as compiled by last week's gcc-8: $ ./aarch64-linux-user/qemu-aarch64 ~/himeno-advsimd mimax = 129 mjmax = 65 mkmax = 65 imax = 128 jmax = 64 kmax =64 cpu : 67.028643 sec. Loop executed for 200 times Gosa : 1.688752e-03 MFLOPS measured : 49.136295 Score based on MMX Pentium 200MHz : 1.522662 $ ./aarch64-linux-user/qemu-aarch64 ~/himeno-sve mimax = 129 mjmax = 65 mkmax = 65 imax = 128 jmax = 64 kmax =64 cpu : 43.481213 sec. Loop executed for 200 times Gosa : 3.830036e-06 MFLOPS measured : 75.746259 Score based on MMX Pentium 200MHz : 2.347266 Hopefully the size of the patch set isn't too daunting... r~ Richard Henderson (67): target/arm: Enable SVE for aarch64-linux-user target/arm: Introduce translate-a64.h target/arm: Add SVE decode skeleton target/arm: Implement SVE Bitwise Logical - Unpredicated Group target/arm: Implement SVE load vector/predicate target/arm: Implement SVE predicate test target/arm: Implement SVE Predicate Logical Operations Group target/arm: Implement SVE Predicate Misc Group target/arm: Implement SVE Integer Binary Arithmetic - Predicated Group target/arm: Implement SVE Integer Reduction Group target/arm: Implement SVE bitwise shift by immediate (predicated) target/arm: Implement SVE bitwise shift by vector (predicated) target/arm: Implement SVE bitwise shift by wide elements (predicated) target/arm: Implement SVE Integer Arithmetic - Unary Predicated Group target/arm: Implement SVE Integer Multiply-Add Group target/arm: Implement SVE Integer Arithmetic - Unpredicated Group target/arm: Implement SVE Index Generation Group target/arm: Implement SVE Stack Allocation Group target/arm: Implement SVE Bitwise Shift - Unpredicated Group target/arm: Implement SVE Compute Vector Address Group target/arm: Implement SVE floating-point exponential accelerator target/arm: Implement SVE floating-point trig select coefficient target/arm: Implement SVE Element Count Group target/arm: Implement SVE Bitwise Immediate Group target/arm: Implement SVE Integer Wide Immediate - Predicated Group target/arm: Implement SVE Permute - Extract Group target/arm: Implement SVE Permute - Unpredicated Group target/arm: Implement SVE Permute - Predicates Group target/arm: Implement SVE Permute - Interleaving Group target/arm: Implement SVE compress active elements target/arm: Implement SVE conditionally broadcast/extract element target/arm: Implement SVE copy to vector (predicated) target/arm: Implement SVE reverse within elements target/arm: Implement SVE vector splice (predicated) target/arm: Implement SVE Select Vectors Group target/arm: Implement SVE Integer Compare - Vectors Group target/arm: Implement SVE Integer Compare - Immediate Group target/arm: Implement SVE Partition Break Group target/arm: Implement SVE Predicate Count Group target/arm: Implement SVE Integer Compare - Scalars Group target/arm: Implement FDUP/DUP target/arm: Implement SVE Integer Wide Immediate - Unpredicated Group target/arm: Implement SVE Floating Point Arithmetic - Unpredicated Group target/arm: Implement SVE Memory Contiguous Load Group target/arm: Implement SVE Memory Contiguous Store Group target/arm: Implement SVE load and broadcast quadword target/arm: Implement SVE integer convert to floating-point target/arm: Implement SVE floating-point arithmetic (predicated) target/arm: Implement SVE FP Multiply-Add Group target/arm: Implement SVE Floating Point Accumulating Reduction Group target/arm: Implement SVE load and broadcast element target/arm: Implement SVE store vector/predicate register target/arm: Implement SVE scatter stores target/arm: Implement SVE prefetches target/arm: Implement SVE gather loads target/arm: Implement SVE scatter store vector immediate target/arm: Implement SVE floating-point compare vectors target/arm: Implement SVE floating-point arithmetic with immediate target/arm: Implement SVE Floating Point Multiply Indexed Group target/arm: Implement SVE FP Fast Reduction Group target/arm: Implement SVE Floating Point Unary Operations - Unpredicated Group target/arm: Implement SVE FP Compare with Zero Group target/arm: Implement SVE floating-point trig multiply-add coefficient target/arm: Implement SVE floating-point convert precision target/arm: Implement SVE floating-point convert to integer target/arm: Implement SVE floating-point round to integral value target/arm: Implement SVE floating-point unary operations target/arm/cpu.h | 7 +- target/arm/helper-sve.h | 1285 ++++++++++++ target/arm/helper.h | 42 + target/arm/translate-a64.h | 110 ++ target/arm/cpu.c | 7 + target/arm/cpu64.c | 1 + target/arm/sve_helper.c | 4051 ++++++++++++++++++++++++++++++++++++++ target/arm/translate-a64.c | 112 +- target/arm/translate-sve.c | 4626 ++++++++++++++++++++++++++++++++++++++++++++ target/arm/vec_helper.c | 178 ++ .gitignore | 1 + target/arm/Makefile.objs | 12 +- target/arm/sve.decode | 1067 ++++++++++ 13 files changed, 11408 insertions(+), 91 deletions(-) create mode 100644 target/arm/helper-sve.h create mode 100644 target/arm/translate-a64.h create mode 100644 target/arm/sve_helper.c create mode 100644 target/arm/translate-sve.c create mode 100644 target/arm/vec_helper.c create mode 100644 target/arm/sve.decode -- 2.14.3