From patchwork Fri Jun 7 00:24:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 802305 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp564548wro; Thu, 6 Jun 2024 17:25:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbgGyYwyST8GnJasahcgZshqPi2CXQEf95xx+xRzTRW4nX0f6THIUkajEPLZ0E6pRv+f+vDkoAY+bBHWdgHk2Z X-Google-Smtp-Source: AGHT+IEa6k5pAQnmck89WewTyY7QAa8mkVv8vUEX8muD7JYsPawgVNpphEt5C/kxirV8910yzLnP X-Received: by 2002:a05:620a:2447:b0:792:c5c7:e914 with SMTP id af79cd13be357-7953c2e88dbmr127398585a.13.1717719929512; Thu, 06 Jun 2024 17:25:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717719929; cv=none; d=google.com; s=arc-20160816; b=XrZzPLC9YBlCtwRgEC6JX+XVWGnedlh01DMuuakki31NMuJxF8jF7mtAiEmWw5RzBt RBppblYdDFP6y2Cee9qteycke/Zdl/vCHZ5Ffs/gEKVGp1xwfCUzcZfeFIqYuDtF5VRn naX0ubMyT9gvDA+YD2praSvvnqSdRgoxdamSyIzA/cJmUr6yDkSWMT9rDc0Bhj63BQyv 3ctsQvK3WWqrc7EThkQMZxMcJm0TOrOHRT2CjGBl0/1Z/lR/13jYFspeo+w0p5aPqfus P0Ce5pzVLXqX3oQoJB5eX8y3G6BNNG8THWH+IXFeC+/OM97p2d5sNFcDOIqWLpb3e1Kh S4bA== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=JpCaxNdPEbUKCHyaU8QeByudgLqqWshFb8jc2026cAI=; fh=A3uSdaROzARb955zJUdRDVbI3bPP36A1SWP1OMRQfQw=; b=WsIXcteJwzAqVxwWFRTHlnTZi4Kk4Jphm/s0VlQDgB3vezPfZeiNZQNROYrulxBUr2 66tvxKdZbxcNmjPY8BYnZK64Xra+kEshXhASsBQVnbvUxO07xIBMPGQCXJYLc337R1/y lFLQ77O74a/L7mpIjbkrTf+/pGX9GLLAjLz8yGwP3A02HFKR3LejHr5CUOTxBdyXfw5e OgDD/8PQ7bEV7zKUEJXKwxv0XLMfFIpYASs+1XMItXjQW5qbBBp0bcTinG2MIDGhyXGn 1SU2Eno6t3Nud6SnIHGXZVWWqDzQ8H5saRPdUACpEGJnlKRiRljzlotN56daETDixfik 0kXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ezfRCB6a; 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=pass (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 af79cd13be357-7953333b560si242195485a.584.2024.06.06.17.25.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jun 2024 17:25:29 -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=pass header.i=@linaro.org header.s=google header.b=ezfRCB6a; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFNPV-0001DW-T9; Thu, 06 Jun 2024 20:24:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sFNPU-0001DA-3c for qemu-devel@nongnu.org; Thu, 06 Jun 2024 20:24:48 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sFNPS-0006wG-DZ for qemu-devel@nongnu.org; Thu, 06 Jun 2024 20:24:47 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-701b0b0be38so1572727b3a.0 for ; Thu, 06 Jun 2024 17:24:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717719885; x=1718324685; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=JpCaxNdPEbUKCHyaU8QeByudgLqqWshFb8jc2026cAI=; b=ezfRCB6a8SGlSvilPgSmLGgawK7nmNEymU0SrqWCj+bwda2HxfBnOZEFH524hstNEb 9+0WL8b34d5j+5G3V+QPkF2pqyjq0Xb/Y2nxQai8TVhiHFk25GwrQgy4ZU5ykDjRrhP5 1V2CpojN0x91vytAN/ZE40NZKfZb2BimqziFJGIaXZizeBgHAzgSjJN3mJwqnoagUVA0 HSZ1TlNVxr4tjYtxL7u17BfdOFvQJvycUZJ9JjYiUwAB6penZJTlH7MrQRJ39GXcxJbS /XcueCDYZbC4ngyoszTMkMzZUWt9TheSejFHC/jc/Jf43JWHc68k07Y8dgz1YLBh+WHw 6+xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717719885; x=1718324685; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JpCaxNdPEbUKCHyaU8QeByudgLqqWshFb8jc2026cAI=; b=c72slK+rLcqO3j2p+1MPYJHImVe+GUpWxHzCN/1f0kGedKzK+H47+huy6lUCavTbuD egC2Y8H4HRglk9Ck+luQ2iAmYEI/E9h9EG0EZp4XwLJeMe2FQcFOqQqMNFO2h5Eg8KCG vPssfXGQFx1LGMmp8bD+XLUWqjx4chJbo1g13NR6ETC3LorylyKcji2e0p7+QUWG1h/G xIAgoJRYcfAmwupCLtsmJXY+AXUveIfvEYlA0++vlbGgxm3paDlh7FssIT6/935s30i1 pNNlrjHbxM3ks6VB3C2i/c4jmkNECubZgDxbNE+8yhFcjS7kbwzo5URIfDgx4jF7/Lhl pIEw== X-Gm-Message-State: AOJu0Ywa3bRkfgCJlMjLNhh14YtqhNutBcZ3tb1ERKGCK69cLOHer2FB SawyeRNSvIWlW3bT1YCc2J9JpoqiXlP01ViJgagWdIrcNqULmEI7FVkVXVHrAK4Y1Ar+Bu2KQMf O X-Received: by 2002:a05:6a20:7284:b0:1ad:7e66:659a with SMTP id adf61e73a8af0-1b2f96d6b16mr1312191637.15.1717719884646; Thu, 06 Jun 2024 17:24:44 -0700 (PDT) Received: from stoup.. ([75.147.178.105]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6e2fc776f24sm30985a12.25.2024.06.06.17.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 17:24:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: maobibo@loongson.cn Subject: [PATCH v2 0/2] util/bufferiszero: Split out hosts, add loongarch64 Date: Thu, 6 Jun 2024 17:24:41 -0700 Message-Id: <20240607002443.5820-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+patch=linaro.org@nongnu.org Based-on: 20240527211912.14060-1-richard.henderson@linaro.org ("[PATCH 00/18] tcg/loongarch64: Support v64 and v256") For "util/loongarch64: Detect LASX vector support" For v2: * Rename to bufferiszero.c.inc (philmd). * Add inline assembly for loongarch64. On cfarm400.cfarm.net (Loongson-3C5000L-LL @ 2.0GHz): # Start of bufferiszero tests # buffer_is_zero #0: 1KB 11021 MB/sec # buffer_is_zero #0: 4KB 32107 MB/sec # buffer_is_zero #0: 16KB 59118 MB/sec # buffer_is_zero #0: 64KB 67940 MB/sec # # buffer_is_zero #1: 1KB 9540 MB/sec # buffer_is_zero #1: 4KB 24050 MB/sec # buffer_is_zero #1: 16KB 38082 MB/sec # buffer_is_zero #1: 64KB 36399 MB/sec # # buffer_is_zero #2: 1KB 8026 MB/sec # buffer_is_zero #2: 4KB 15493 MB/sec # buffer_is_zero #2: 16KB 20865 MB/sec # buffer_is_zero #2: 64KB 19694 MB/sec r~ Richard Henderson (2): util/bufferiszero: Split out host include files util/bufferiszero: Add loongarch64 vector acceleration util/bufferiszero.c | 191 +----------------- host/include/aarch64/host/bufferiszero.c.inc | 76 +++++++ host/include/generic/host/bufferiszero.c.inc | 10 + host/include/i386/host/bufferiszero.c.inc | 124 ++++++++++++ .../loongarch64/host/bufferiszero.c.inc | 143 +++++++++++++ host/include/x86_64/host/bufferiszero.c.inc | 1 + 6 files changed, 355 insertions(+), 190 deletions(-) create mode 100644 host/include/aarch64/host/bufferiszero.c.inc create mode 100644 host/include/generic/host/bufferiszero.c.inc create mode 100644 host/include/i386/host/bufferiszero.c.inc create mode 100644 host/include/loongarch64/host/bufferiszero.c.inc create mode 100644 host/include/x86_64/host/bufferiszero.c.inc