From patchwork Fri Jan 26 04:57:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 125907 Delivered-To: patch@linaro.org Received: by 10.46.84.92 with SMTP id y28csp115270ljd; Thu, 25 Jan 2018 22:37:21 -0800 (PST) X-Google-Smtp-Source: AH8x224U1J1kmpZNzBZWXno7HlDNnzskymIDdPDGRhx4BF5NZj20waICBvA1ZNH12j0RnehvrNEC X-Received: by 10.37.219.144 with SMTP id g138mr10163785ybf.195.1516948641038; Thu, 25 Jan 2018 22:37:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516948641; cv=none; d=google.com; s=arc-20160816; b=ylJtE0xz/eD2p/uvGH01F9ajqp1+XxTUlgIVVBkO/ob54RubZzpkrDu7rZ/H4EwOTU ZhxwS7el+NKJJJuInpd0+BlVRafU+CDgEyoxmJEe+0nxnGQq2bd4GYo0+I67xvyh769y zXd5paZI1ziLtXgGuAA/ZBFtezQgCE8UH75urJbMdEgmx5CR7HtRNj/qRYXf05UFZ743 7mG0oO8OU0bsWPhlU6XlBvEtf12nGim/7QbTsWbvf2XvqxmIQ8Q7XS+4pD+TPbGNVFOd iCABxAIUCrt1WnHfqOhbJIU926w3nkdow4Lb3hRtt+C9MG8I/sCkgqxD8uG9QS9qKfxF TdWQ== 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=j9YBBgpyb1xGqODiJQQwyEJbYyUdR4fR2CqKEPph2Pc=; b=w96q8Xy9Z88Y9+trG6J4lzZH+GkR9tgQX/JVJvJ4OYFJwD5Kdbhkaptm3w2ZNJNLD0 WUnTgd9gsG3JJCfiZLYUmBd9umFEv0Nx/ZD72Q8tD+2Z+kSTeGJHeFfg1hrp8q1Meu2p o+y3KmtVSn3+W/Pov8DZapHG0lpQp98YwfGKWnLXz6TAtNasBkBB1lRuL+14BfrADbFT XszXOtOqbnLRDbkWo71e+SMagbu4B++YDucigmrkKhFWLILJ72ssorqucTIYJqbQszvF E7oMj170CKWK6U8bmJQ6l+nZ44OvXtYEhMeLnVI06BDxz4FUOfJM3s3Cbhmwiz1QFFXf 07lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=jXxFhbZj; 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 u20si2162654ybj.35.2018.01.25.22.37.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 25 Jan 2018 22:37:21 -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=jXxFhbZj; 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]:35074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eexdY-0007uS-Gi for patch@linaro.org; Fri, 26 Jan 2018 01:37:20 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60130) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eexao-0006d1-3P for qemu-devel@nongnu.org; Fri, 26 Jan 2018 01:34:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eexal-0000cU-0R for qemu-devel@nongnu.org; Fri, 26 Jan 2018 01:34:30 -0500 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:39293) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eexak-0000cE-Rn for qemu-devel@nongnu.org; Fri, 26 Jan 2018 01:34:26 -0500 Received: by mail-pf0-x22e.google.com with SMTP id e11so7645149pff.6 for ; Thu, 25 Jan 2018 22:34:26 -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=j9YBBgpyb1xGqODiJQQwyEJbYyUdR4fR2CqKEPph2Pc=; b=jXxFhbZjEUiQy1D17fFL/yP2QZi8SDgsp+2844041NWxK3xSl6jLd6yKeDzcIWJgCB ugsT58Pje5TQIuDb1I2RpDvOCpAWVgKNuvTdI6qCGhXhCQD+wTbU5BApSGz/X6y1nIO9 PGUIvsRjixI02rpp/6Gzn1GQiOwjs6P/zumQA= 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=j9YBBgpyb1xGqODiJQQwyEJbYyUdR4fR2CqKEPph2Pc=; b=hyOXEi5uk+8E9n9QqxK7EH+oS67oKiH/p9vKBAbI8rUZ/zfhgO/SFI9+hiC0BNb4eY GmKjEuFBjrmLlwYJHf2Jm/om8dt8g7hBTmGttT1TqOtRn7OFTYmuXPXb1r9o2zs+VFCu L7trCgu45V8+ooerxu2z/9WCljplEsp0BQwZsDzeexqAfGaISe0uq68x9maLRLSa1r1V kOth1iDkLIlSYa08FUocBkn+jzUsmAdeL4vRu47d1Eh0Ru12VJF8htmH2VCQoSx471gQ x8Jh5vX03EeSBo8LkqxhGT47347H9ZkAJrwda1BknXp+QedxGXOjHdGNiqv9xHGGibjs 3Q7Q== X-Gm-Message-State: AKwxytdvcxeYih9TqOJ6p/w8CI+O5RTuyLDJNEGSIkqKazwLTPbqElyk 4pymAQNszBv2xlHM8/6gJLRmHMYm9II= X-Received: by 2002:a17:902:b783:: with SMTP id e3-v6mr13625769pls.160.1516942676607; Thu, 25 Jan 2018 20:57:56 -0800 (PST) Received: from cloudburst.twiddle.net (174-21-6-47.tukw.qwest.net. [174.21.6.47]) by smtp.gmail.com with ESMTPSA id q67sm20460313pfi.164.2018.01.25.20.57.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Jan 2018 20:57:55 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 25 Jan 2018 20:57:22 -0800 Message-Id: <20180126045742.5487-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:c00::22e Subject: [Qemu-devel] [PATCH v11 00/20] 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 v11: * Use dup_const more. * Cleanup some gvec 2i and 2s routines. * Use more helpers and less gotos in target/arm/translate-a64.c. Changes since v10: * Squashed a fixup patch which escaped my attention while preparing the patch set. Ho hum. 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 (20): 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: 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 | 306 ++++++ tcg/tcg-op.h | 52 +- tcg/tcg-opc.h | 46 + tcg/tcg.h | 87 ++ accel/tcg/tcg-runtime-gvec.c | 997 +++++++++++++++++++ target/arm/translate-a64.c | 979 ++++++++++++++----- tcg/aarch64/tcg-target.inc.c | 588 ++++++++++- tcg/i386/tcg-target.inc.c | 987 ++++++++++++++++++- tcg/optimize.c | 150 +-- tcg/tcg-op-gvec.c | 2215 ++++++++++++++++++++++++++++++++++++++++++ tcg/tcg-op-vec.c | 389 ++++++++ tcg/tcg-op.c | 42 +- tcg/tcg-pool.inc.c | 115 ++- tcg/tcg.c | 125 ++- accel/tcg/Makefile.objs | 2 +- configure | 48 + tcg/README | 86 ++ 25 files changed, 6973 insertions(+), 496 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 Reviewed-by: Alex Bennée