From patchwork Thu Oct 17 04:42:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 176540 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp387719ill; Wed, 16 Oct 2019 21:44:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiqo6ru4X44BWVO3t14Gl2cBWwpuJvUPgqotFw3Enp9zAmIhAyB/bZYO8ex4sNyO7ZE6Qj X-Received: by 2002:ac8:3823:: with SMTP id q32mr1866197qtb.20.1571287456375; Wed, 16 Oct 2019 21:44:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571287456; cv=none; d=google.com; s=arc-20160816; b=NiwxlDDKUUR+Eqf8SJXwHFkz5xSKBaCWljrvMKINpmq/8Vyf93jJUJbXNIYQ3KSCCQ 2e0Hk4S8vfwoslZxDQTX3sqCn1DoE6WoIqsIj0kqLMPDCpOBH73hO8UrIeHP5ZfL6UeQ +ZOMvgVONJkOHdvqk808/ChT0kmk/ULCatXzZYUrBV+hexMJVqX649Bx8by1L0ahY3at rTmbcaG39xGa82hzTmpB53wTE0t6nu7qK4lzkjHweq5ezfze7fevH2+Ry+yie0lR/0tc pdDhUIbvn4nx0F8hoY9j5mEG2aUjP9X9ESFAgTKOMBZrl/Lg8L9zjhSYFDvTeAPS9l9g Erdg== 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:message-id:date:subject:to:from :dkim-signature; bh=VGGT3zBbzVc/cTftpyLP217c9MkvFdIixs9regxae10=; b=bVMuNshaZenO5G0Aeu+n5H7i4KUtZqY1mpHBBTRxugxM3tOXhgBt49G/nne2hxCzew XGQy2kMyX664htya6u+OabPIsu1JJrno5Pc3xjbwOmwzkVCIe9giq4x7dKMazxMJMBTi dWOuM3VFK0SLcxjWXCQnyKY3lp3t5Ywb/YZjcqPaqW/SRdNq9cwADOJJiJJoUBgvMux5 tGnVWOMSvoEyEi6VQBKO3cYQ6CDhMwEICNNnb55GKEhOmPxrr8tS/6WY3tO9Lixk9i8t fwTK2HRJujUGgw+CvJCAJ+MHr8u7kZRLGFfj+h005ti0K07Tj1bC4giY6zu8Ti6ENRUX t69Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZrUh6pSW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id x23si979800qtc.13.2019.10.16.21.44.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Oct 2019 21:44:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZrUh6pSW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:33216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKxe3-0000jO-Tf for patch@linaro.org; Thu, 17 Oct 2019 00:44:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53365) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKxcU-00074a-6n for qemu-devel@nongnu.org; Thu, 17 Oct 2019 00:42:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKxcS-00024I-OY for qemu-devel@nongnu.org; Thu, 17 Oct 2019 00:42:37 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:41588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKxcS-000241-JN for qemu-devel@nongnu.org; Thu, 17 Oct 2019 00:42:36 -0400 Received: by mail-pg1-x529.google.com with SMTP id t3so558493pga.8 for ; Wed, 16 Oct 2019 21:42:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=VGGT3zBbzVc/cTftpyLP217c9MkvFdIixs9regxae10=; b=ZrUh6pSWLktkvMbmRVVzxc8zMZFJfq0BgGhuGdGCzwN/hKtq68o0/ljkdRStxOuq6z IUjMU3FcxVTMnO6F3wxxPH+PPGvJOaXnTQOAKg7+FNrdfibPAxEZdQgIbO1FT4WGjj7h /BZeuZmXNSOr7zXiKTVD9gGnVfpEo+GET7dyU+olHUk0+ZjraIvcZ6hZvpZSVHjeK6Mk IejJ1NfVaHqdNTakupY979pp7abpWdWW1facPRGS36gWE2cx2m7yLSOkpRGVwyP0BYvb cfIdLOvVqcPz+fJEMCNuVGgnzwjU3GXdZpk2iocqX34zncc/MOaa1e8S7QLt9m7KtoE0 Y7LQ== 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=VGGT3zBbzVc/cTftpyLP217c9MkvFdIixs9regxae10=; b=QuUyqGu19IYk3XdwJWpfhckKIlyvFS+piwQ9JY0gLeBzR2FaPj4FGo7MVU9EpZQKSM sP6lRvqENCFa77dCPlXMTDzxygToyIcRBMcrjO18oRoikuIu08nPT5u5nRziRwZNDgqU xub8gF6RPgNMNdMcpFQqprOu4LBcWMwUNxsjazp/0JQGTxSSLr3VOfBDKuhnwripVepv /LDeGeX5ZiSnjnCFWBsCBAU68yIowgFbInwpFWOqsD9kAcRTNDsJoCcchztggfkbKPjA rp8WT8d1eYV2+ic0fLcXqEKTOv3Z8uzyrnBCdNG1spmtNK/hyExfLiqk0I8w1I3Pz40c FQLw== X-Gm-Message-State: APjAAAWALmB6SYdw5TO9JuPmEBoc2YHJTtY9lMeiClaH+4S7JRdaJCWk xdksEgwXYtXruNmsNGMPhDmxcsOyYak= X-Received: by 2002:a63:5a03:: with SMTP id o3mr1846145pgb.381.1571287354897; Wed, 16 Oct 2019 21:42:34 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id n15sm718923pjt.13.2019.10.16.21.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 21:42:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 0/4] target/arm vector improvements Date: Wed, 16 Oct 2019 21:42:28 -0700 Message-Id: <20191017044232.27601-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::529 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The first patch has been seen before. https://patchwork.ozlabs.org/patch/1115039/ It had a bug and I didn't fix it right away and then forgot. Fixed now; I had mixed up the operand ordering for aarch32. The next 3 are something that I noticed while doing other stuff. In particular, pmull is used heavily during https transfers. While cloning a repository, the old code peaks at 27% of the total runtime, as measured by perf top. The new code does not quite reach 3% repeating the same clone. In addition, the new helper functions are in the form that will be required for the implementation of SVE2. The comment in patch 2 about ARMv8.4-DIT is perhaps a stretch, but re-reading the pmull instruction description in the current ARM ARM brought it to mind. Since TCG is officially not in the security domain, it's probably not a bug to just claim to support DIT without actually doing anything to ensure the algorithms used are in fact timing independent of the data. On the other hand, I expect the bit distribution of stuff going through these sort of hashing algorithms to approach 50% 1's and 0's, so I also don't think we gain anything on average to terminate the loop early. Thoughts on DIT specifically? r~ Richard Henderson (4): target/arm: Vectorize USHL and SSHL target/arm: Convert PMUL.8 to gvec target/arm: Convert PMULL.64 to gvec target/arm: Convert PMULL.8 to gvec target/arm/helper-sve.h | 2 + target/arm/helper.h | 21 ++- target/arm/translate.h | 6 + target/arm/neon_helper.c | 117 ------------- target/arm/translate-a64.c | 83 ++++----- target/arm/translate.c | 350 ++++++++++++++++++++++++++++++++----- target/arm/vec_helper.c | 211 ++++++++++++++++++++++ 7 files changed, 562 insertions(+), 228 deletions(-) -- 2.17.1