From patchwork Tue Nov 21 21:25:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 119402 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5810790qgn; Tue, 21 Nov 2017 13:27:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMbKsu4XBdg0GbUosU/z6Ip7XgovPubloaEcdQxvFZnSLeXuUJ9svKxa3AlIVutnwjXB/zQG X-Received: by 10.37.187.71 with SMTP id b7mr11198623ybk.182.1511299678681; Tue, 21 Nov 2017 13:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511299678; cv=none; d=google.com; s=arc-20160816; b=l3rF01YR0pujQwoRgYkQ9uv4sXvSRHlPF70z3U1Q5yrIvc2C2enZMWz5Nr+5BlBwJ2 b3pzfQ0CrI7NBYKRRKN5LA8LcEbT8324zeFg5NfxEyBU+7s2PaBVr+13RmkDWwmc2RiG 0orE7+cDvufxqHICq+QWC8h9Bm8h6WFkgctirk/coP88VJa8XZMkNelpHSE3Z0n95fcZ r4p4A+Je2cr9qLOEH1wg1YsPj7Dnac3ID1+UYCelwC87x4Ws6urBLLhKmyvDpZ9dVj57 pQNKTBV2FvOFK8dLwC8wf87nOl8Sssex6BnTKWIeAmM1ThtpxxUqNmZWj5BJR98Xf+D2 jvKg== 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 :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=D7fGqJGpM4AVqtHLHrQjPyTXdYK/nD7+81oiEyVecz4=; b=vKU48nkrUxlsi/z5EaBlxtteNXG2SxgIfzNAcLqmdIYALfAlq7tApqdDbmNcN8Ji6j HIAc91luwAY9mJ9qBCicUMJZxsEPGU3TqBUMccdzN9/7RwxTL0/zE8znampTTcNkwZUo v44Qym+HNk/4x6dBjjw5BJ0YSO+czwRFhlR7gPGzALqcf8PFKald9gOeK47/9pyK7jX5 KUb0ebElCaKRcZVcSJaRJRyf4w+RCOn/mnEfWEMLnSWVfa3iNDqzd1lrYdzIV8zx4Q5j KoGfkiyXJwMmlgNiiYuEiy1Y4+O1hJn1AQSiPoFMFNaqDMwKSgyKXuNIpWT4UXs8GIY9 ig5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IdSd6cEE; 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 d133si3057845ywc.396.2017.11.21.13.27.58 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 21 Nov 2017 13:27:58 -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=IdSd6cEE; 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]:36574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHG5G-0004Go-56 for patch@linaro.org; Tue, 21 Nov 2017 16:27:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHG4z-0004GW-LW for qemu-devel@nongnu.org; Tue, 21 Nov 2017 16:27:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHG4w-0007bD-HS for qemu-devel@nongnu.org; Tue, 21 Nov 2017 16:27:41 -0500 Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:41707) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHG4w-0007an-9p for qemu-devel@nongnu.org; Tue, 21 Nov 2017 16:27:38 -0500 Received: by mail-wm0-x22c.google.com with SMTP id b189so6312515wmd.0 for ; Tue, 21 Nov 2017 13:27:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=D7fGqJGpM4AVqtHLHrQjPyTXdYK/nD7+81oiEyVecz4=; b=IdSd6cEEo5gplRxwE7RUr1vgZSXXWz1mq/uRfwRuONvGwGCQWIKw0iJYyQ7Jlh+c6n s3/hTd/xlzzSJ57jkSLBmLgKLv9D9cLt+KyEFaEY7YfF9CA/ggu7MrO37H0BPIIC0iwy UGwbcyQgXozHzjfcqpbhmTePs8QCNvPNVeP/g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=D7fGqJGpM4AVqtHLHrQjPyTXdYK/nD7+81oiEyVecz4=; b=ldzOk8FC/lA35seTYM5ZySsnxW+bCQ/eNWmc8LBkQQTUhg5u+zaeaWUOAw6Ou8EMDe noMzWOXl/l1CXbOG1bmL1fwrEVZsjvEU5W9MzcKw5psOMIE/3+BrJUvhVxlZN7KWCQdf TJiyUQKBvRLAVMjWbGLCS9QsgRipRwouBgRVIz816DaOZLXH2GYU7SZS+1b/U4nnzDM5 IqPaK8j3fTaWgi5Wp1+rdor3FKoOX0Z2jYJg5UcglTvPNakRKnyuEpfBvesn8XJFuC8v nuO7T8Dbx+6I0FqscBmi+N6lpfhvvMe5j89c/J5KBtBskv+IuTF9Suw62WE6CKJ8Yrv9 clPw== X-Gm-Message-State: AJaThX4mX252fRLZ5PwBhg4MU+cZhnNuQG7CT/nq0TnuPO9X7hejUSMH BsJv5qIcJzktRdd4BbOLicGQTzwSKGg= X-Received: by 10.28.214.198 with SMTP id n189mr2707960wmg.59.1511299656695; Tue, 21 Nov 2017 13:27:36 -0800 (PST) Received: from cloudburst.twiddle.net (70.red-37-158-60.dynamicip.rima-tde.net. [37.158.60.70]) by smtp.gmail.com with ESMTPSA id e124sm706517wmg.34.2017.11.21.13.27.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Nov 2017 13:27:35 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 21 Nov 2017 22:25:08 +0100 Message-Id: <20171121212534.5177-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22c Subject: [Qemu-devel] [PATCH v6 00/26] tcg: generic vector operations 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" Quite a lot has changed since last time. The representation has changed such that the vector length and element size is stored in the TCGOp structure. The functions have changed such that the element size is passed explicitly rather than being encoded in the function name. I've added additional operations for multiply, immediate shifts, compares, element interleaves, and widening. I believe this is all we'll need for implementing ARM SVE, so I'll leave off for now. This has been tested vs aa64 risu on both x86_64 and aa64 hosts. r~ Richard Henderson (26): tcg: Remove TCGV_UNUSED* and TCGV_IS_UNUSED* tcg: Dynamically allocate TCGOps tcg: Generalize TCGOp parameters tcg: Add types and basic operations for host vectors tcg: Add generic vector expanders tcg: Allow multiple word entries into the constant pool tcg: Add tcg_signed_cond target/arm: Align vector registers target/arm: Use vector infrastructure for aa64 add/sub/logic target/arm: Use vector infrastructure for aa64 mov/not/neg target/arm: Use vector infrastructure for aa64 dup/movi tcg/i386: Add vector operations tcg: Add tcg_expand_vec_op and tcg-target.opc.h tcg: Add generic vector ops for interleave target/arm: Use vector infrastructure for aa64 zip/uzp/trn/xtn tcg: Add generic vector ops for constant shifts target/arm: Use vector infrastructure for aa64 constant shifts tcg: Add generic vector ops for comparisons target/arm: Use vector infrastructure for aa64 compares tcg/i386: Add vector operations/expansions for shift/cmp/interleave tcg: Add generic vector ops for multiplication target/arm: Use vector infrastructure for aa64 multiplies tcg: Add generic vector ops for extension target/arm: Use vector infrastructure for aa64 widening shifts tcg/i386: Add vector operations/expansions for mul/extend tcg/aarch64: Add vector operations Makefile.target | 4 +- accel/tcg/tcg-runtime.h | 102 +++ include/exec/gen-icount.h | 9 +- include/qemu/queue.h | 5 + target/arm/cpu.h | 2 +- target/arm/translate.h | 10 +- tcg/aarch64/tcg-target.h | 30 +- tcg/aarch64/tcg-target.opc.h | 3 + tcg/i386/tcg-target.h | 46 +- tcg/i386/tcg-target.opc.h | 11 + tcg/tcg-gvec-desc.h | 49 + tcg/tcg-op-gvec.h | 219 +++++ tcg/tcg-op.h | 55 +- tcg/tcg-opc.h | 59 ++ tcg/tcg.h | 135 ++- accel/tcg/tcg-runtime-gvec.c | 616 +++++++++++++ target/alpha/translate.c | 22 +- target/arm/translate-a64.c | 1135 ++++++++++++++++------- target/arm/translate.c | 31 +- target/cris/translate.c | 4 +- target/hppa/translate.c | 63 +- target/i386/translate.c | 13 +- target/lm32/translate.c | 2 - target/m68k/translate.c | 14 +- target/microblaze/translate.c | 4 - target/mips/translate.c | 2 +- target/nios2/translate.c | 6 +- target/ppc/translate.c | 2 +- target/s390x/translate.c | 42 +- target/sh4/translate.c | 2 +- target/sparc/translate.c | 2 +- target/tilegx/translate.c | 10 +- target/unicore32/translate.c | 4 +- tcg/aarch64/tcg-target.inc.c | 674 +++++++++++++- tcg/i386/tcg-target.inc.c | 1325 +++++++++++++++++++++++++-- tcg/optimize.c | 20 +- tcg/tcg-op-gvec.c | 2010 +++++++++++++++++++++++++++++++++++++++++ tcg/tcg-op-vec.c | 566 ++++++++++++ tcg/tcg-op.c | 24 - tcg/tcg-pool.inc.c | 115 ++- tcg/tcg.c | 286 ++++-- accel/tcg/Makefile.objs | 2 +- tcg/README | 148 +++ 43 files changed, 7107 insertions(+), 776 deletions(-) create mode 100644 tcg/aarch64/tcg-target.opc.h create mode 100644 tcg/i386/tcg-target.opc.h create mode 100644 tcg/tcg-gvec-desc.h create mode 100644 tcg/tcg-op-gvec.h create mode 100644 accel/tcg/tcg-runtime-gvec.c create mode 100644 tcg/tcg-op-gvec.c create mode 100644 tcg/tcg-op-vec.c -- 2.13.6