From patchwork Wed Jan 17 16:09:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 124826 Delivered-To: patch@linaro.org Received: by 10.46.62.1 with SMTP id l1csp98735lja; Wed, 17 Jan 2018 08:16:02 -0800 (PST) X-Google-Smtp-Source: ACJfBosJvU+xrFiUUxLXXdxl5Im49QNjD4KiXtiFcCVU8tz088n80EKCffJ+MkWp5KyZaDI/L9gT X-Received: by 10.37.19.200 with SMTP id 191mr38796997ybt.245.1516205762095; Wed, 17 Jan 2018 08:16:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516205762; cv=none; d=google.com; s=arc-20160816; b=DBm8o05YwGwPVwzx5N1G7kTu7p49zQJAUqKkDRHLnLWePXo++FbOmVEuw76G7J9VXt HwdgJjFDAf0N8GOETE1siA3N7mRPMc8xhkxT89exFA92Rv8NAYb3rxJINiS6oTBqxX2k DQIbsduBq9OOQsMYA1XOES+x8oaLnXebIh230wN4rwIzwsSLLA+E62cgMo9nVcKw1TME JnY5R2ZmGXY9wTql8W8QU5p2RijN/pgBPrhKjozg3/gAsfgVxsGHy6lVKMypfp8mvaFp pPPNs/jK3FiaIgw6E/AcsaP67NJKO7v9NONXDoMmgBOo6r+YS820b4fA//QLCHQrVtsg 8QBw== 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 :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature:arc-authentication-results; bh=P3ictxi33yu9ncoUs9tAaXo38RgLJ3ezJfNWb1Np+Wc=; b=HZn1v5hWuGXZOnJcDfV5cMbyOS5pBJNolXswt3+5Tx2CI3c0o9I0nNLOy0V8++A+jd aVY2CwSqirpU+FXiZNQxD2n7AiGlTihemSAUOrpqU/FiJ8whceuYDqPTLDuzvQiU9t65 osSlORz4ISszuZhwTMIs5AWSDafwy9H3kNXshexeLN58/kZpbBqZecGcDEDYsha/EFQ8 Y0ijQMaSuvPr2kMO6VmyCgLmY9aO0RHjTP5n5+hmxLU/m3cKl95kUVp14tBuS7vYUYJ4 cD4KB/MFWrsLTTmXtCzcqRXwaOHZmNJQh/aXJ0JFnjf2xn6/zhI22KvVNM+JP+595H7H PKhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jN5auyUO; 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 n76si1191751ybg.583.2018.01.17.08.16.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 17 Jan 2018 08:16:02 -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=jN5auyUO; 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]:45320 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqNd-000702-DS for patch@linaro.org; Wed, 17 Jan 2018 11:16:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqHW-0001dx-7l for qemu-devel@nongnu.org; Wed, 17 Jan 2018 11:09:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebqHT-0001CV-0p for qemu-devel@nongnu.org; Wed, 17 Jan 2018 11:09:42 -0500 Received: from mail-pl0-x22f.google.com ([2607:f8b0:400e:c01::22f]:36824) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebqHS-0001C7-O2 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 11:09:38 -0500 Received: by mail-pl0-x22f.google.com with SMTP id q2so9208979pll.3 for ; Wed, 17 Jan 2018 08:09:38 -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:mime-version :content-transfer-encoding; bh=P3ictxi33yu9ncoUs9tAaXo38RgLJ3ezJfNWb1Np+Wc=; b=jN5auyUOZMaWTcpNxU/5L1/5yf5h5WTQE1qFE5Jg82YDpGjMy6JjnRs6QkwDpGU0cO fhvSvXvR07TybqF3Q73QJIcE4VwlzxqbuQgP/LnOcgrdrpkrRWJz7MfdyyfDKKpIO/cE 5m+iqF1I8h7Qb912uZcLb66EmpU/IFKAKEnfM= 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:mime-version :content-transfer-encoding; bh=P3ictxi33yu9ncoUs9tAaXo38RgLJ3ezJfNWb1Np+Wc=; b=S1lRZbhxIp+mNJ55m3kqrcbIHZMQuKzPVDXVDg2ZgsFB9hr9++AYaprAh9RdMxpfhV cc6xjEAS1wWLIvS+/CGJmCKKr/jrNF0YdsuTwC0i8r+P8h5oOVa1CxE9tu4BkwlJF1Sr ZkOPTH/THB4cAjK2itmtnJsIM8HbLpy9dCbEGb22fhmvj8OwPlt77Y90/pzODPfGMCj4 4zGhLee4JEcZIszGvE3r/E4NH6DxlMgCvrwm7eYhQSJw2agmUJun0kwgGPd6bo5Lvjte KswbVxo55Od8YgS51coaJBuyH/UL8JxOaZx1rO/kTa4vlYxMnOqXJYaqNkzua9VqATkF Zp2Q== X-Gm-Message-State: AKwxytcMwP9cqDY2ojZ/lTGTJEtyc794wmkr98s9IDS9WDZUYYQCJXEI cPwHVvKAWXSF4eGZ6GNEdkvbi3DMfdQ= X-Received: by 10.84.234.199 with SMTP id i7mr11625345plt.368.1516205377175; Wed, 17 Jan 2018 08:09:37 -0800 (PST) Received: from cloudburst.twiddle.net.com (24-181-135-63.dhcp.knwc.wa.charter.com. [24.181.135.63]) by smtp.gmail.com with ESMTPSA id t25sm6368905pfk.162.2018.01.17.08.09.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jan 2018 08:09:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 08:09:12 -0800 Message-Id: <20180117160933.28086-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::22f Subject: [Qemu-devel] [PATCH v10 00/21] 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: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Changes since v9: * Detect whether __attribute__((vector_size(16))) operations are supported by the host compiler. This includes the case affecting ppc64 where gcc-4.8.5 crashes. Note that gcc-7.2 does pass the test on ppc64. * Dropped support for vector interleaves and element size changes. My target/arm patches were failing RISU checks on a big-endian host. I need to re-think what to do about host endianness and target representation of vector operations crossing lanes. For now, only support generic vector operations that are agnostic to element order. r~ Richard Henderson (21): tcg: Allow multiple word entries into the constant pool tcg: Add types and basic operations for host vectors tcg: Standardize integral arguments to expanders tcg: Add generic vector expanders tcg: Loosen vec_gen_op* typecheck rules tcg: Add generic vector ops for constant shifts tcg: Add generic vector ops for comparisons tcg: Add generic vector ops for multiplication tcg: Add generic helpers for saturating arithmetic tcg: Add generic vector helpers with a scalar operand tcg/optimize: Handle vector opcodes during optimize 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 target/arm: Use vector infrastructure for aa64 constant shifts target/arm: Use vector infrastructure for aa64 compares target/arm: Use vector infrastructure for aa64 multiplies target/arm: Use vector infrastructure for aa64 orr/bic immediate tcg/i386: Add vector operations tcg/aarch64: Add vector operations Makefile.target | 4 +- accel/tcg/tcg-runtime.h | 118 +++ target/arm/cpu.h | 2 +- tcg/aarch64/tcg-target.h | 25 +- tcg/aarch64/tcg-target.opc.h | 3 + tcg/i386/tcg-target.h | 41 +- tcg/i386/tcg-target.opc.h | 13 + tcg/tcg-gvec-desc.h | 49 + tcg/tcg-op-gvec.h | 297 ++++++ tcg/tcg-op.h | 55 +- tcg/tcg-opc.h | 47 + tcg/tcg.h | 78 ++ accel/tcg/tcg-runtime-gvec.c | 997 +++++++++++++++++++ target/arm/translate-a64.c | 974 +++++++++++++----- tcg/aarch64/tcg-target.inc.c | 607 +++++++++++- tcg/i386/tcg-target.inc.c | 1043 +++++++++++++++++++- tcg/optimize.c | 150 +-- tcg/tcg-op-gvec.c | 2226 ++++++++++++++++++++++++++++++++++++++++++ tcg/tcg-op-vec.c | 474 +++++++++ tcg/tcg-op.c | 42 +- tcg/tcg-pool.inc.c | 115 ++- tcg/tcg.c | 129 ++- accel/tcg/Makefile.objs | 2 +- configure | 48 + tcg/README | 95 ++ 25 files changed, 7151 insertions(+), 483 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.14.3