From patchwork Wed Jan 17 16:14:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 124847 Delivered-To: patch@linaro.org Received: by 10.46.62.1 with SMTP id l1csp106962lja; Wed, 17 Jan 2018 08:39:53 -0800 (PST) X-Google-Smtp-Source: ACJfBou9d2lNWyRdd5tg3nGSt1gVwLuY3t1t/pwAa4HUFV7wfT9rZf8oKvwWQ94s3MC7R0WvUk+2 X-Received: by 10.37.129.80 with SMTP id j16mr25963833ybm.9.1516207193840; Wed, 17 Jan 2018 08:39:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516207193; cv=none; d=google.com; s=arc-20160816; b=RBzmc11j7tgeN8L2pDW+EzBszl4d5W/XA6+bmFc8ZBJDmZwqG527TUiAGVgJ/AXUcv N/5Xwz2aTsjirTFlG28IOZe1Yv7EsbOenUFMKv3v9/Do9Un0JSJ4/xYvYjzJMrlyGUN4 og856ID0M72ZoELZjDwRC9SJaBfo92b2PznYOJEMSAK6d8wY30ktHYx9W41Yupbwiw+b H7B5uhuwmWgFKieQHp/zrvQ7fuQ4pcJD277nQQBnQmfZIcBA/WcxmGFmj5c7rEIGjJSY KYkO1qD9kKEjb5/Sd7vOjNriNdlQugwIdb9VMMio/1JMkCWkHav0baytEYnv06D+zqUn +UPg== 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=9hzST52cULiWgzFJvlqIOBKE4sr0Df4bYbyDVJ7YLWA=; b=Xfr6Iky6V2MspkJ2f1cqN62Ns5r+mY6k26YRFzfzfFOeBgAx6vDSEclXxifp3JoNTZ 9JRMFeyKp8DOv7MgB8bLC9ApRXjOCoxCs1hsHuO41YeQ/Aj4v54wRaua1LYt8B6HoYyk LZP1tkOHl5xO9UpVOupC599f/Xb77wEpGWUS+xQivDAuLcq2CP0JDNKJSZosywoly73m +vbdVTdFtELR/wC2nXGDsFGXONUatqorzIhkQ7NFCWRRBeeQ1A83jHbsDVlhDTM+6mC3 +ZXzM+OjIh3dNrORzJj6mUYtiLJ5WTPYYoCveK+KBLGruqFgCFn4jhotRGZRoprizW4u saLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=S9/ZiKG2; 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 c3si1167935ybl.691.2018.01.17.08.39.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 17 Jan 2018 08:39:53 -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=S9/ZiKG2; 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]:46003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqkj-0002kn-5S for patch@linaro.org; Wed, 17 Jan 2018 11:39:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebqMO-00068V-H0 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 11:14:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebqML-0003Nj-96 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 11:14:44 -0500 Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:35323) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebqMK-0003NO-Vs for qemu-devel@nongnu.org; Wed, 17 Jan 2018 11:14:41 -0500 Received: by mail-pf0-x22e.google.com with SMTP id t12so11803752pfg.2 for ; Wed, 17 Jan 2018 08:14:40 -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=9hzST52cULiWgzFJvlqIOBKE4sr0Df4bYbyDVJ7YLWA=; b=S9/ZiKG2swQzo1/YhTm7qmxytfLupbY9ch29EaOS9hyUR33UEz6gAk4LJmIIV76zM1 rc1FhCQL6i+BeWGBsJDRA95LIVf8Xmk7TAPLzI3Gv11Ln4k0pLFiOZ1us8x18O8ZhufP LD3e/bvGFmKVnzwzKBMQhXtSyeILUPzXRIt8o= 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=9hzST52cULiWgzFJvlqIOBKE4sr0Df4bYbyDVJ7YLWA=; b=e3moISgcCU08+WPRMH952ZY5xXDd/fYedHsiw48z3tyfs5Tc+Uf6ifjv/YcUbTNYMZ f/omdeJB5QjEhT1E8IouXJbY6/LFB/RfzB3OPtnUJXmgMPU+ZidwitfxPdRhzAtlxFr4 f8uf3321dXutKnqzaAts1hdCsu1eI0GsSJa9Plikj+aPmaPKG7BjEWCD4+FoYXURe9hN DGdpcl1SFpimgSFVEyvMv5tLmUdlE4IlOmREanFqCgBP5UlnrAt+mMd0QTw69E+PsZlE 9aG6Uk67SpXCz6Xh6NcG58UTLdNmTAmiG8Ucn6zoNm3PqKJrBekS3oN51J8RpLAM5peg vfeg== X-Gm-Message-State: AKwxyte6bqO2FUg8vE+5YSLljaX2cPLekH4Q0CEAYF+MGYJNERnCdxCH BKdi2XxNS7tg6JRPDGKjUBqxErL3WJI= X-Received: by 10.98.17.21 with SMTP id z21mr14717960pfi.86.1516205679580; Wed, 17 Jan 2018 08:14:39 -0800 (PST) Received: from cloudburst.twiddle.net.com (24-181-135-57.dhcp.knwc.wa.charter.com. [24.181.135.57]) by smtp.gmail.com with ESMTPSA id l10sm1099311pff.64.2018.01.17.08.14.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jan 2018 08:14:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 17 Jan 2018 08:14:15 -0800 Message-Id: <20180117161435.28981-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 v10.5 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 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 (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 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 | 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