From patchwork Wed May 15 14:58:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796956 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp3025908wra; Wed, 15 May 2024 08:00:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVKGiWW/9N06FcXvFI3MkG0BFcOpJq48bT/eOcvPt4RXZYR6Ku81w8Tq9HK6VAdcXxQsO1pCa0UO2+qScn+Fhhc X-Google-Smtp-Source: AGHT+IFAPJdNCTLOmML7HreL1ubvBf3TUCp5bhC8PKAnVzv46bXMBNlVfe/o2LdfGCRgNsgKBcLA X-Received: by 2002:a05:6102:3a0b:b0:47b:eb7f:4fd8 with SMTP id ada2fe7eead31-48201516834mr5039842137.11.1715785242313; Wed, 15 May 2024 08:00:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715785242; cv=none; d=google.com; s=arc-20160816; b=PWYhz9LpazEFWA2LJTxSaAoiVfKuEqSjDJJJojcIDFUjJ+CGq/hBHELNtFVQIQ6gtW qOpfGh6pHxmJIFwZUy6zkXtRrx5pSZX2xABkXhiMQloMGkcqeHUzj+ikcQhaEcDIHX6m qCNHnSa7dsJINnTIimVLQVDE5zCMHxAbOo9HSKbbrpzGxfo6ed4yTVDt9ywtfgf6rf6T aOL5PZjlhoyLzYTQf3MI5koy00Tdq3GysrYSOCULnw3Om3HzeOAq5fkCqIebZhCosISi 1V4wTprfqupDUP4xp+ltm3RKRlr9OphNWg+AoujFSzit2aLKYin+bHb2+xUOblD8k7jZ kuIQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zWr5b7ogG/rKIVgZ3ajQkJPbaaMpVh+KqxIFrCgh+w4=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=nESY9/JqQytH+l/vV8paEtelpbz6Kg/4V2y6ywfcymzwrL62+TH8NYI6PcGFjSr74B lfD0NU76se7Fcrz6K5ieC2EkelAGQg5gF4sy2jJEcmSfhK1AS4lUqWoVFgIWWY6K+sjL Ld5jD0zRjA7LTjQE4ofDjGiZkzJx2scTFEvvBtrZ6oeZ9iUOxhOfTsYYEtHrE3YNZPdp ZQjCr8ZLphyEIX2GXzsRCB2vOVZKzTg0v+8c8DvaSelgv9j2oVfzLzdGLgZPD6LmCxU+ aKn373CWTz1gMnqUe/H89iRd9uZR3eccWhvwx3iIRMjTnRc5hitRf0rZXjSWUj1zLDhY cUqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x1wtNjVb; 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 ada2fe7eead31-4806cc9236asi2355102137.659.2024.05.15.08.00.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 08:00:42 -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=x1wtNjVb; 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 1s7G63-0005Cg-SK; Wed, 15 May 2024 10:59:11 -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 1s7G61-0005CJ-Lg for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:09 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7G5x-00077Q-IX for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:09 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41ffad242c8so37712175e9.3 for ; Wed, 15 May 2024 07:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715785142; x=1716389942; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zWr5b7ogG/rKIVgZ3ajQkJPbaaMpVh+KqxIFrCgh+w4=; b=x1wtNjVbvhSf3e2YDLi0sAwqIHh57VwN5E8bJbAfwJgt8rapDxMKbN52PXT9wSNpVR THIcP706bp0kXr0o+UlM1/kIxjH5f17IDZGvcaOC9AWJzjVe6K4BeZbuR8D1dJ8fR1aI gbP4uVRO2lWc1b+jzAeOd2y1hjXRv0QX6iuHWFy4TOe0478VEgzsa6baX56gfugFvfqj Zp7nc4dyeJqQ0aT6P2EiguzRcsNaKXKoWD5AMGOTnU8emwUQL/iHLJ3AOyguQ1ZVO53L z6w7YqxQ1stl4riFIRyWB/KBx+M9UpzDYEOGd1ifTlUalTaDNBffOSY/IwSgaPdhQ5BH WYjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715785142; x=1716389942; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zWr5b7ogG/rKIVgZ3ajQkJPbaaMpVh+KqxIFrCgh+w4=; b=B8R2pkX4Yt3bprCc9H7IgOK3Zp8RpvACMqWpwFb5Fbu8Ltn/WGPRoweLAk4N857EQJ tX4lBJ90r9ZMEOnaYTEqjST7OmVAxrWw0LndsGWZEO1tdjsp75d4r1IvUjd5lBLWYC6s yBNheNMwoAJLGNuYvvAsTgx2n7WTTjHIzGAh90lxwlNeecvAe2DShK0jddssoaIjWb1K v6oElq4jUClFrQpIzzmEYm1SOsjfKllKnAHbl2Qx3a2Gu45LQZmiDEw6fll6aYvLT4pg 0wrnqJMoBdSflrLwpccY+ti5NFD7iTpB3uOPM0/nemcLAljVzSUOicTH5JMshXAc1MTN Z0jA== X-Gm-Message-State: AOJu0Yw3991rr8sSiSQsNFPszhpNmclAYRDUIq8ECNMCqpFNp4YY8eK/ HBqJCc5y12blcNaPNNps1GE6t39eKKWFGd5jEzCTnjVxeQj5AlsXIjJuMOWceqHZ/d28DWUcy4H FRsE= X-Received: by 2002:a05:600c:4f0c:b0:420:1f0f:fe19 with SMTP id 5b1f17b1804b1-4201f0fff56mr61846545e9.13.1715785142301; Wed, 15 May 2024 07:59:02 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f88111033sm272134645e9.34.2024.05.15.07.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:59:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 1/5] tcg: Introduce TCG_TARGET_HAS_tst_vec Date: Wed, 15 May 2024 16:58:56 +0200 Message-Id: <20240515145900.252870-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515145900.252870-1-richard.henderson@linaro.org> References: <20240515145900.252870-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x333.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 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 Prelude to supporting TCG_COND_TST* in vector comparisons. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/tcg/tcg.h | 1 + tcg/aarch64/tcg-target.h | 1 + tcg/arm/tcg-target.h | 1 + tcg/i386/tcg-target.h | 1 + tcg/loongarch64/tcg-target.h | 1 + tcg/ppc/tcg-target.h | 1 + tcg/s390x/tcg-target.h | 1 + 7 files changed, 7 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 2a1c080bab..21d5884741 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -155,6 +155,7 @@ typedef uint64_t TCGRegSet; #define TCG_TARGET_HAS_minmax_vec 0 #define TCG_TARGET_HAS_bitsel_vec 0 #define TCG_TARGET_HAS_cmpsel_vec 0 +#define TCG_TARGET_HAS_tst_vec 0 #else #define TCG_TARGET_MAYBE_vec 1 #endif diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index 85d5746e47..138bafb9da 100644 --- a/tcg/aarch64/tcg-target.h +++ b/tcg/aarch64/tcg-target.h @@ -167,6 +167,7 @@ typedef enum { #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec 1 #define TCG_TARGET_HAS_cmpsel_vec 0 +#define TCG_TARGET_HAS_tst_vec 0 #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_NEED_LDST_LABELS diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index a43875cb09..434a892e07 100644 --- a/tcg/arm/tcg-target.h +++ b/tcg/arm/tcg-target.h @@ -150,6 +150,7 @@ extern bool use_neon_instructions; #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec 1 #define TCG_TARGET_HAS_cmpsel_vec 0 +#define TCG_TARGET_HAS_tst_vec 0 #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_NEED_LDST_LABELS diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h index a10d4e1fce..2f67a97e05 100644 --- a/tcg/i386/tcg-target.h +++ b/tcg/i386/tcg-target.h @@ -224,6 +224,7 @@ typedef enum { #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec have_avx512vl #define TCG_TARGET_HAS_cmpsel_vec -1 +#define TCG_TARGET_HAS_tst_vec 0 #define TCG_TARGET_deposit_i32_valid(ofs, len) \ (((ofs) == 0 && ((len) == 8 || (len) == 16)) || \ diff --git a/tcg/loongarch64/tcg-target.h b/tcg/loongarch64/tcg-target.h index fede627bf7..29e4860d20 100644 --- a/tcg/loongarch64/tcg-target.h +++ b/tcg/loongarch64/tcg-target.h @@ -194,6 +194,7 @@ typedef enum { #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec 1 #define TCG_TARGET_HAS_cmpsel_vec 0 +#define TCG_TARGET_HAS_tst_vec 0 #define TCG_TARGET_DEFAULT_MO (0) diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h index 04a7aba4d3..e154fb14df 100644 --- a/tcg/ppc/tcg-target.h +++ b/tcg/ppc/tcg-target.h @@ -173,6 +173,7 @@ typedef enum { #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec have_vsx #define TCG_TARGET_HAS_cmpsel_vec 0 +#define TCG_TARGET_HAS_tst_vec 0 #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_NEED_LDST_LABELS diff --git a/tcg/s390x/tcg-target.h b/tcg/s390x/tcg-target.h index ae448c3a3a..62ce9d792a 100644 --- a/tcg/s390x/tcg-target.h +++ b/tcg/s390x/tcg-target.h @@ -163,6 +163,7 @@ extern uint64_t s390_facilities[3]; #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec 1 #define TCG_TARGET_HAS_cmpsel_vec 0 +#define TCG_TARGET_HAS_tst_vec 0 /* used for function call generation */ #define TCG_TARGET_STACK_ALIGN 8 From patchwork Wed May 15 14:58:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796954 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp3025657wra; Wed, 15 May 2024 08:00:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVI/oh7UDoKOaEO1cV4mMrqImWbd6r3zVmjRhWU6iyU6HsvimVfB/WvTTEtaJmIR2mA49BVUR9v3BNRAeyVXAAm X-Google-Smtp-Source: AGHT+IFTuCe8pqxntw0UoPbAjLkbQoO4VXXd8Yi/2BF2HpEwrtj+TMgqSXLiqxCuXcbcnXcRRO0r X-Received: by 2002:a25:8747:0:b0:dee:7942:c099 with SMTP id 3f1490d57ef6-dee7942c49fmr9653619276.38.1715785219038; Wed, 15 May 2024 08:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715785219; cv=none; d=google.com; s=arc-20160816; b=JCUpWpSLkLAdRI17wWSm//JzGqjhK8UJLfnOhRC1kvUCtc5sZMah1upY2ZB61f2Eag ZZn/mE3gG8/SsEevSHKOzwG2S/F2Tr90aSXxWXXFyteX3Nwew8zEGBC9BFl+txlnErOZ 6cWgKV91IgzRF8NjNOsYMn32bu15jZgcL1Uii+ioXPOYm48Z0Nczgmoeku5sIWjU8Kus xU9AOgpdAplryJIX0exhVbRYk+AiRH4WXSg6AZLUbULkW+C8EQ10f0ZNP95bW3Fwjth0 QVQ20XIkNYVAauGPBlvIeGMCTEON+HBegOdgHQ1j20v2fkgjoILBtzCYGPye+ljdMtMs tQoQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UWacmcJvifrn2h1svRsx1ekY33Etna0YPOTwfPRLIos=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=eUIp46DLAIp0HKgFBdUyQl+zK8wWhjClDtlQi+dYWlL6hgrfuseDiejK+hRQAOkPFe wKlOdJaIaeBSEaRyaR2X23ApcU/43AJKATvRJqjKgNHSKvg3y+FCdUjDb9daH/hw4pOV CMYPNPwU7+9p8m3OUAcpTyvOfRMJAzkitGorIK05gyA+VUu8SsFG5GfVRzws6i+kmYWj TQqvj89y68omU20wqld0jUUqVypOaWsrsdKnXedtrZuWXlacZbgi19/U5bp+EOb9PU5c wknYtj2TeT5C4siCo5U8fx9R8hNQ7v1Dk+PFEEYcYq7N57rjVBzv77L7enF+g3OeMWXV /3+Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R0snUELR; 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 6a1803df08f44-6a15f2ef76csi154637096d6.450.2024.05.15.08.00.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 08:00:18 -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=R0snUELR; 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 1s7G6C-0005G2-Ct; Wed, 15 May 2024 10:59:21 -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 1s7G68-0005EF-9j for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:17 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7G5x-00078y-I3 for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:16 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42011507a57so30727065e9.1 for ; Wed, 15 May 2024 07:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715785143; x=1716389943; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UWacmcJvifrn2h1svRsx1ekY33Etna0YPOTwfPRLIos=; b=R0snUELRb9f+qEXOJ7oaxi0HazuD65FDv1mnD6P1EaKZNSn6lVXqZDaLCSsZH51ahP mtIqNzg17qmxbzfhZ+d/BdVu0E/3w+QPCbmJE5LAfSk3YfIDi8Hq+rwqkyIWVQs1s5tW NT+A30coUtY5A5vidnOVkdgiu14vEeVox2YvrYPc+0cb++KIgsDVgKC4gdIKzEL66vfb kkrcSwW4EHABYwPxnPLoeqQ2wrAcgbFeN1xXPclrshQRqaoMb8D0bMMlOL1Y2Su0nO1E 6gYAUxZRPTd0ijeBeWgAhs+7CylFmiSJUA+j2qYe1pIRhhNbvwxGmJhi1HnujE5TApG/ YfDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715785143; x=1716389943; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UWacmcJvifrn2h1svRsx1ekY33Etna0YPOTwfPRLIos=; b=SA46reBlec3E+zvhVoE92Vw0SyNur3iiIP1PTcg5DHx23dcZHXn6i2xzgKHoyrzfCg PeJibd806rpWMiKTk29E9jcs/bzMAsFnwPFhcbzb9sxIoFZMtfMPMJZYdI6A+5QUtyvp yo0I/Gj6IhIAFkUJRbPEOtDrDK4mfNVGHqHCHsYwh26UD9J4owmcg0xhfOg4uhyi73Fk ZnMl4rF8lwo47ErIc4IFClI6+Hr3Bv/lFCAy3vsp3dHh5y8ruK60q3fNbd3lBeXqSKuh +Jv8J6wj9s8eLOTAZEclRrDNG/5TblGOcYS+KkddEl++bkwddSaysnL5YQwjlj4ekFtA wr5Q== X-Gm-Message-State: AOJu0Yz4WK63WGHQ1hMb8354v/4umkUuXUALrrMPZ7/6T6NqQ2Rephux h4nRLFAkR2WSJgSg+it4RBg4xpXd/j71fjK5BZVgJtQbtx/bExQa4LWROPOGKkMw58dChKv0aB6 3Of8= X-Received: by 2002:a05:600c:314e:b0:418:3eb7:e8c6 with SMTP id 5b1f17b1804b1-41fea927e69mr136973615e9.5.1715785142815; Wed, 15 May 2024 07:59:02 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f88111033sm272134645e9.34.2024.05.15.07.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:59:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 2/5] tcg: Expand TCG_COND_TST* if not TCG_TARGET_HAS_tst_vec Date: Wed, 15 May 2024 16:58:57 +0200 Message-Id: <20240515145900.252870-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515145900.252870-1-richard.henderson@linaro.org> References: <20240515145900.252870-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32e.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 autolearn=unavailable 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 Signed-off-by: Richard Henderson --- tcg/tcg-op-vec.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tcg/tcg-op-vec.c b/tcg/tcg-op-vec.c index 094298bb27..84af210bc0 100644 --- a/tcg/tcg-op-vec.c +++ b/tcg/tcg-op-vec.c @@ -508,9 +508,11 @@ void tcg_gen_cmp_vec(TCGCond cond, unsigned vece, TCGTemp *rt = tcgv_vec_temp(r); TCGTemp *at = tcgv_vec_temp(a); TCGTemp *bt = tcgv_vec_temp(b); + TCGTemp *tt = NULL; TCGArg ri = temp_arg(rt); TCGArg ai = temp_arg(at); TCGArg bi = temp_arg(bt); + TCGArg ti; TCGType type = rt->base_type; int can; @@ -518,6 +520,18 @@ void tcg_gen_cmp_vec(TCGCond cond, unsigned vece, tcg_debug_assert(bt->base_type >= type); tcg_assert_listed_vecop(INDEX_op_cmp_vec); can = tcg_can_emit_vec_op(INDEX_op_cmp_vec, type, vece); + + if (!TCG_TARGET_HAS_tst_vec && is_tst_cond(cond)) { + tt = tcg_temp_new_internal(type, TEMP_EBB); + ti = temp_arg(tt); + vec_gen_3(INDEX_op_and_vec, type, 0, ti, ai, bi); + at = tt; + ai = ti; + bt = tcg_constant_internal(type, 0); + bi = temp_arg(bt); + cond = tcg_tst_eqne_cond(cond); + } + if (can > 0) { vec_gen_4(INDEX_op_cmp_vec, type, vece, ri, ai, bi, cond); } else { @@ -526,6 +540,10 @@ void tcg_gen_cmp_vec(TCGCond cond, unsigned vece, tcg_expand_vec_op(INDEX_op_cmp_vec, type, vece, ri, ai, bi, cond); tcg_swap_vecop_list(hold_list); } + + if (tt) { + tcg_temp_free_internal(tt); + } } static bool do_op3(unsigned vece, TCGv_vec r, TCGv_vec a, From patchwork Wed May 15 14:58:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796955 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp3025837wra; Wed, 15 May 2024 08:00:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV4nbLNwcu/CArgAgLLm13l4wDlY/TP8XkkxivOKzRAXXPfOY5KMKNiT7O+sdR5xS1MR+gYahIHxTU7tEL3VOIh X-Google-Smtp-Source: AGHT+IFLppyKP1hvdJD3mfKkDuvaMcNw+zH02sGPsNjJQR5s86RqN0HXlqvCPw9A4GdRhNug/iIf X-Received: by 2002:a05:6102:942:b0:47c:3368:b824 with SMTP id ada2fe7eead31-48077e7b654mr13190321137.22.1715785234894; Wed, 15 May 2024 08:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715785234; cv=none; d=google.com; s=arc-20160816; b=EHwt9aRfqPPSWm95GuCvIvrA1NL3iY43MaZVDz8MP/2gEBy6R0QrHLDFZtxnAG8dBb tA9rCyTV7PdHELI/C6JJRaBwwrCFF6yREcFmzv0+Y46xtOJ2MaA21HdTBUNcJ1PFGFYH PgKPZnrmRNUjgSmm7MVVvEZRGA4rlM29G3FX8tJmEuHp68NpvSFFnxEBpzgpQe0O6c/G JTrLmH9B/c0I09hp9tzA5Q5P7AUgJpMb5AKXCIjOVEbRwlv+yU0QiX+KgNbG1j4Jaruq KVUpUYEyyuiiPtTcH1TUPyIA2rFjJ+wtd68WQYVvRpbKM83bHd3Y04J7y7xcICVgzHI/ YFhA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+UEAzmz2yf/FXZrHjq+7bspL7xDnH65PbwwSYmcMRBs=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=xyHx3s9BR4R7Je/0LQvyxIeiFN1LQznQMr9bub2u1/w/GdOjAdHHCD7uZHG5OcbpF5 GqxuJ7l9npoQhh/q2CZX+3DBgVrUDyC1nz7790mXw1ZpwHn/nGwfos5FcY1/lzdaDDLx VWpttAjnHTHb1X+A4y8sk1qR76bF+W0llzxWBMksbZu+V2W11k6XacZ0iYlkAIMTu55n YNjmRGzxc/gxDxc8DBlKxx5CwbYOJuQp7XRjQR4kdIwHFAXdlD9ok+wh+CMTdmGb2mjz ULXtDXNigmTBLaC0DPmv17a3ymvV1BNII35dldlGX3aohFoQNgzss+6LWYfA6o3Yl8aw KZVQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XgfbktcL; 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 ada2fe7eead31-4806cc6ca42si2226162137.440.2024.05.15.08.00.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 08:00:34 -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=XgfbktcL; 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 1s7G69-0005EE-KJ; Wed, 15 May 2024 10:59:17 -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 1s7G64-0005DU-Oi for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:13 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7G5x-000799-Ve for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:12 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2e4939c5323so84872751fa.2 for ; Wed, 15 May 2024 07:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715785143; x=1716389943; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+UEAzmz2yf/FXZrHjq+7bspL7xDnH65PbwwSYmcMRBs=; b=XgfbktcLWc1hDT51tXfzByvy9mfXUHz0MNUc3oP/4M83EDwmGJhRDPHyB7lDnVYPtU RmCCRvpG1h0jKUsVb/VL5eSP7v0K6Ma80gcyRn9vGSdJbErEXOqe+cLs4Cjg1m2KFf5C Pw7J/NU467lMh8pEfU8I6QXJCHrsqaXgtL7rs9XDWGlDfRxVZO8rjKpacK675SL6tPnh b2FXIaYeO0TpBYc4VVCUTv8Ya2t6m4yqXu55sNVTw7yd08TqzXluPRwmYqJjy8kG5W47 Aw8qkzC3Ju850fhB5Q6p/lJZxadilbUPnBMTvRxZS/p2TETwQrE13tFGx1sCbO/zEE5f jSrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715785143; x=1716389943; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+UEAzmz2yf/FXZrHjq+7bspL7xDnH65PbwwSYmcMRBs=; b=aU1/4uWKP26IsgoPto6wqMsCzIIZBCrLMui82cDOAYmFlXbDYGarJzEZdigtbErjne VL17ZNmvieicDMDDdFJJo7yJEHxSkP0aWlBkLxXza14mf4nynVMdFpdF4309GEHilz53 LdIxSf3t53v9WITQB/BtgvIRjM1/DA9N0s7aVx4S8heOHuu9UmVNOy0zestNeOMtp4ZJ nqF3sTkNo2ITjdjCuoOorUNTLK7LeIw2hSFWx2aSg31sJ0HZsM0OLJdL8/Oicd0qghy9 eq8psUT3ijcP4vAIEcnP5407WnQAGEX/cxeu6seGvcjNHMozr0CXslkAcST/EIpYczbZ CXyA== X-Gm-Message-State: AOJu0Ywn3YIoqUcKeenPwBzsG4QHHGtu0kjt73oZn40Ub/EzxWE5WKc4 amzU55kSgq1Wd9WKk4gKn86opWQkoEyXsi6DjhYof02b2gtoeo8p9bP4kX5inxrA5wDbZsBe+wK b9go= X-Received: by 2002:a05:6512:3294:b0:51b:6366:3459 with SMTP id 2adb3069b0e04-5221027800cmr13784999e87.67.1715785143330; Wed, 15 May 2024 07:59:03 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f88111033sm272134645e9.34.2024.05.15.07.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:59:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 3/5] tcg/aarch64: Support TCG_TARGET_HAS_tst_vec Date: Wed, 15 May 2024 16:58:58 +0200 Message-Id: <20240515145900.252870-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515145900.252870-1-richard.henderson@linaro.org> References: <20240515145900.252870-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=richard.henderson@linaro.org; helo=mail-lj1-x236.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 autolearn=unavailable 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 Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 2 +- tcg/aarch64/tcg-target.c.inc | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index 138bafb9da..8bd9e6a5eb 100644 --- a/tcg/aarch64/tcg-target.h +++ b/tcg/aarch64/tcg-target.h @@ -167,7 +167,7 @@ typedef enum { #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec 1 #define TCG_TARGET_HAS_cmpsel_vec 0 -#define TCG_TARGET_HAS_tst_vec 0 +#define TCG_TARGET_HAS_tst_vec 1 #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_NEED_LDST_LABELS diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 56fc9cb9e0..ffa8a3e519 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -2737,7 +2737,8 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, TCGCond cond = args[3]; AArch64Insn insn; - if (cond == TCG_COND_NE) { + switch (cond) { + case TCG_COND_NE: if (const_args[2]) { if (is_scalar) { tcg_out_insn(s, 3611, CMTST, vece, a0, a1, a1); @@ -2752,7 +2753,27 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, } tcg_out_insn(s, 3617, NOT, is_q, 0, a0, a0); } - } else { + break; + + case TCG_COND_TSTNE: + case TCG_COND_TSTEQ: + if (const_args[2]) { + /* (x & 0) == 0 */ + tcg_out_dupi_vec(s, type, MO_8, a0, + -(cond == TCG_COND_TSTEQ)); + break; + } + if (is_scalar) { + tcg_out_insn(s, 3611, CMTST, vece, a0, a1, a2); + } else { + tcg_out_insn(s, 3616, CMTST, is_q, vece, a0, a1, a2); + } + if (cond == TCG_COND_TSTEQ) { + tcg_out_insn(s, 3617, NOT, is_q, 0, a0, a0); + } + break; + + default: if (const_args[2]) { if (is_scalar) { insn = cmp0_scalar_insn[cond]; @@ -2791,6 +2812,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, } tcg_out_insn_3616(s, insn, is_q, vece, a0, a1, a2); } + break; } } break; From patchwork Wed May 15 14:58:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796952 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp3025578wra; Wed, 15 May 2024 08:00:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVtn75FTlILjTqPOnkhJZnT4LUVXrrAGveh46NY2QC3EtsI8pPWje78ezaEZKT8Mv9hghSqVKmzALZd+EDyN3Mm X-Google-Smtp-Source: AGHT+IE/Q1KESJAvf4lkOeQFLPBTSez99tgnq4DRh8IVwflSlSN3FNRWPimcB8iopdI9B4cZ5eHw X-Received: by 2002:a05:6214:320c:b0:6a0:4255:b727 with SMTP id 6a1803df08f44-6a16815228bmr169407196d6.9.1715785212385; Wed, 15 May 2024 08:00:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715785212; cv=none; d=google.com; s=arc-20160816; b=zaXTDos+DTIC+1Jm0N528DDNj8VT1E9hwCP/Q5BgyfNBQGdsQX+rN+DfhH3gj78fT1 B1qY6BNs0mc64oPwI9QYflerH+UAzTwTdOTH/rElePkOwnMGYUBzCgWlK9sRy7oDdFzP Ps5UWy6AMSgbKgrUF+1ATXkuZeW6RJSsnaOCz3Lcz4Tfej2ymuZyj+Ru5BFkII+GZj3m ymYQCot27IcA5/BlliwFXIoTxxxRkA6a+UqmHJ3wPAcl3pMumLRU8+34DQWdxHhmO4ke Uk7JR+k1nXQvotH/Z/tlIoBb9UoZ0xnekwwg0dqJTVZmW4ZM2EarFLGkcd/TKFRbvnEB NnYA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WpiThysDuX7JPl+AhNyZ7t+FQuyygOMAjCR+jn6zrYU=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=uohW3+4Vyog3Cu/w103BLfY0zCICwZB4lrNIisjXs1Tmx3UwDAL8xohJLpSzwvKNT2 6+T5lAznK9AOPj/A+OqbZ0BEgIcDP2BMDLnHnq+QvwHRCpVSVGrnOF9MssNSbleM7w7F yITAFqn6NCK4GyF/G9YcHkgumtweXxYcBTrtRI0gBmvCpPswER9RDgU0lcerv9VvlBjs ebzVYu95grCMyMYDGyD5DCbDbF0/AzO09XYkc17o6uEiawp0ZJl7tGUL8qyimemEsF9q Dh/H60DNxwiddxs7Af+iwgSnabVwNBUwYeovqAtRUNXj+uX+FsPMxppZJAI4xJosU1yz 254g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VAj7sfll; 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 6a1803df08f44-6a15f2b6a5esi141954106d6.378.2024.05.15.08.00.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 08:00:11 -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=VAj7sfll; 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 1s7G6F-0005H0-2w; Wed, 15 May 2024 10:59:23 -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 1s7G68-0005EH-KH for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:17 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7G5x-00079t-Iq for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:16 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-420180b58c3so23928165e9.2 for ; Wed, 15 May 2024 07:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715785144; x=1716389944; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WpiThysDuX7JPl+AhNyZ7t+FQuyygOMAjCR+jn6zrYU=; b=VAj7sfll52bIq08uflTWutQGWAiqZlQkktxno/BnZ8fC1s7YkFZdxhFFn1JtEnvMJj EMxcARCwNI0cWeRFm9HBLHAMaJJp6M4vxuaBTvB3RhybZ83WdyJJ9vGATafXryutSf2W vSDTGeRQMtlmbtiFPKlloCzvSI6vd+9VqE+qCodl5DLnBdvLsnYATl4cjOO0xbEVLwda wdZQ1ofUSVOFDVL6jQEDtlinYc3mefsmg4BT9pwXYAEs3fQ1znG5KRkHSf1f+VtiL+Q6 v3XMNzL25XAgot88huNi6L2SljvBcgapf6qRhAfOxhnP4kL3YfN5hrixjGJvZx6sxE4g B1jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715785144; x=1716389944; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WpiThysDuX7JPl+AhNyZ7t+FQuyygOMAjCR+jn6zrYU=; b=ecOxnlQJgaLklF1C896yzADJEYfivOrayR5fMl/XtK7BmFg98DFTcH8c1TgP6BAi3Y vrE6jMtVAuRXVKySdlcrckYM/xurYNTNV3XZf5e1dl9GHQDHxYQj4TBhfCKfJYkdtSVh yNOYZIoB7lO8U3u/8YqU9WAo7Eibtk0iecM8iKYA7pgZeqbSngv113gT4lLDeYSmsV0j usMt91OZQFC3fgzz6bXTkRO+CEC9JvFC0BTgV2nmtU+KskqaQrwV4nayizv4njWgN0oO iuvb1y8pFXXRcSBJY6ePiQ9+v0HvQ3rU9ORf2UooVsSIDqcbDTvoZROXmGN0N4Wei/Wa kb4g== X-Gm-Message-State: AOJu0Yy5TMg+TJ5UYQM2VpYbrF9bQ0YYNsx/CJ5opUaZD4mYg+hkTz1x IwKnVDiKr2qHqfoMm/zKRFz8vqgY92oUyzSrgJXVfufScII5NaXcRxa7rZDL1lR/XZSufq9DcBX VGM0= X-Received: by 2002:a05:600c:3544:b0:41a:b54a:9ad8 with SMTP id 5b1f17b1804b1-41fea52e620mr118768115e9.0.1715785143901; Wed, 15 May 2024 07:59:03 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f88111033sm272134645e9.34.2024.05.15.07.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:59:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 4/5] tcg/arm: Support TCG_TARGET_HAS_tst_vec Date: Wed, 15 May 2024 16:58:59 +0200 Message-Id: <20240515145900.252870-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515145900.252870-1-richard.henderson@linaro.org> References: <20240515145900.252870-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=richard.henderson@linaro.org; helo=mail-wm1-x32f.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 autolearn=unavailable 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 Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 2 +- tcg/arm/tcg-target.c.inc | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index 434a892e07..fb7261499b 100644 --- a/tcg/arm/tcg-target.h +++ b/tcg/arm/tcg-target.h @@ -150,7 +150,7 @@ extern bool use_neon_instructions; #define TCG_TARGET_HAS_minmax_vec 1 #define TCG_TARGET_HAS_bitsel_vec 1 #define TCG_TARGET_HAS_cmpsel_vec 0 -#define TCG_TARGET_HAS_tst_vec 0 +#define TCG_TARGET_HAS_tst_vec 1 #define TCG_TARGET_DEFAULT_MO (0) #define TCG_TARGET_NEED_LDST_LABELS diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index 6a04c73c76..3de5f50b62 100644 --- a/tcg/arm/tcg-target.c.inc +++ b/tcg/arm/tcg-target.c.inc @@ -2740,17 +2740,33 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, case INDEX_op_cmp_vec: { TCGCond cond = args[3]; + ARMInsn insn; - if (cond == TCG_COND_NE) { + switch (cond) { + case TCG_COND_NE: if (const_args[2]) { tcg_out_vreg3(s, INSN_VTST, q, vece, a0, a1, a1); } else { tcg_out_vreg3(s, INSN_VCEQ, q, vece, a0, a1, a2); tcg_out_vreg2(s, INSN_VMVN, q, 0, a0, a0); } - } else { - ARMInsn insn; + break; + case TCG_COND_TSTNE: + case TCG_COND_TSTEQ: + if (const_args[2]) { + /* (x & 0) == 0 */ + tcg_out_dupi_vec(s, type, MO_8, a0, + -(cond == TCG_COND_TSTEQ)); + break; + } + tcg_out_vreg3(s, INSN_VTST, q, vece, a0, a1, a2); + if (cond == TCG_COND_TSTEQ) { + tcg_out_vreg2(s, INSN_VMVN, q, 0, a0, a0); + } + break; + + default: if (const_args[2]) { insn = vec_cmp0_insn[cond]; if (insn) { @@ -2769,6 +2785,7 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, tcg_debug_assert(insn != 0); } tcg_out_vreg3(s, insn, q, vece, a0, a1, a2); + break; } } return; From patchwork Wed May 15 14:59:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 796957 Delivered-To: patch@linaro.org Received: by 2002:a5d:452e:0:b0:34e:ceec:bfcd with SMTP id j14csp3026574wra; Wed, 15 May 2024 08:01:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWPiwaJSiJvOUxSq7ANv7/9WOjQIXjISU6/29yRmC8ab0DrDpGsOZ+nmMJQEhI3wM7RyofeOQGg3lhPDEqiqOBQ X-Google-Smtp-Source: AGHT+IHO9ZBhuYN/CiGl/VuCpfNSFjTx2ACWRu1Vgjidpu3o/8apoxBg7Lsw8OAOkPzxJ4XLEaEB X-Received: by 2002:ac8:5d0e:0:b0:43d:dee6:812a with SMTP id d75a77b69052e-43dfdd0d327mr187622441cf.61.1715785299216; Wed, 15 May 2024 08:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715785299; cv=none; d=google.com; s=arc-20160816; b=ceyXr/aa19dtePyiXEzs8Od4/jeUgHUdCna7YjmjAfhh+r7S1I5Q5vAeVx71UYJyNM piybG0z/PQ4E+bNZY5VlF6gkPyzqwmbCKfOgHHOXxYJ+/fvwNVXEjceGsW94CjqfK2wK J0yu0At93UnsTQdY5NfrpENzjrSojG8FAbvBJbPZsD97WYJqsW9FueI22uPGodi1Yrak XuIaspOUfFEU7hPtg9I8HJWY06sQ6iOqet0/EDEefrgy/XOOLbfzLZBcoVxjTHgdDm0L ECvYRqWcqOTrAv6G51P7atKhByF2macIe5mRuQ2cO8oB6+KiInDq0rQmX5aU7BqbWTI6 xbFQ== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KkrM6eUfNQC4/ZxOfw3RoQ+l/U6+/yIajWSBPEUqefU=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=Ovm+b7aHyyiwxkzf9T8vcd7qC9ZUInrABh0dlz3GwNH0WccyyYk35Sc5QpXuJEQws9 vjBNmneP2DIuyA3blEd02EwTgus+5RqXJaPMLBUHYXXsLs6aGDW3Ap8gcSHUWRgoy0FW lgQMz8WlyuccYLvDpUcs0ROkW1Lcix6BexkDYbNW4AvBBSAyJSyMUelihCU/OJ31g8ZY 2dJ2kg1nIoGJungpyRG+hUU1WvkS31cQgsUwVIbXizaw7uZrrnQPEBVGgvCSux51K/UW ZDMVi4nnUF3uXw0P8g80uRQY/Ow3+veCTCBSJVQXMWZAlpNeZkkkb9zoX14e76iaQ7mb izuQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C88AauUo; 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 d75a77b69052e-43e134c8bbdsi76618521cf.433.2024.05.15.08.01.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 May 2024 08:01:39 -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=C88AauUo; 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 1s7G6A-0005Eo-2k; Wed, 15 May 2024 10:59:18 -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 1s7G65-0005Dv-UV for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:13 -0400 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s7G5y-0007CM-3z for qemu-devel@nongnu.org; Wed, 15 May 2024 10:59:13 -0400 Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2e6f2534e41so15349781fa.0 for ; Wed, 15 May 2024 07:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715785144; x=1716389944; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KkrM6eUfNQC4/ZxOfw3RoQ+l/U6+/yIajWSBPEUqefU=; b=C88AauUoq881icwjVGnJPqx6yy6DSU+DCZ9Wu1wb+Y0VqDO1xIG3b2cKd1DmSMYsm+ +apMamKY6yHdwHcjIHDQJXjwV2gthHbaH1ahoelnQqfBq3T0R8C/ExrK6JXQkkCkyLp8 TEyDeKHmJHKADd4rp01OOVeSHBU8/tDwyPakTc6DyQYUQThCRqoAByLynRq93EKCZTdZ U4MvtiVaPFcuMy00UsXe2KNpwfHQrwgeTIYcZHXBphC8hZe6hGmkG10MBnyBuFV8L0v4 XL4sf5V5ZGczNLhlXKt91WeeQrh40JWKw1FyUKQd00/vyTn8cwpH07CIxZutkJNbmDBd HA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715785144; x=1716389944; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KkrM6eUfNQC4/ZxOfw3RoQ+l/U6+/yIajWSBPEUqefU=; b=c2sOiw2xZUDmYKvxBD3bhXy8kqCfG10F7502rzJzBs7P+YTYQzxnKJnekQ0t6Bpj9k B0Nu3ab2Nt3dNVn2ssl3lPa35icsKpX5DVARnufLkT8p2UoHFJKWFyhsnyvPGWJkKivC e+XxQdfSxLYQvdRnC7DlOMd3oZZXAzwUkgihX7bL0uSsyMnF7EO58gvHzT1MKeQUa5Y1 R/IKAiAIel77PxaiEBsUu1gs4a4WxBMf+AnUN6NR+O/cEJOZNcMoSRI3ueVc30xOOAP8 qxOs6zICHZF41Q1ZXf9QE0k/vYzSFp+MIsXaBjY6v3kdvUQnuHPyyon66aPYZ2laWOeW +uuQ== X-Gm-Message-State: AOJu0YwXsaQu1UgiM5cvPc7vJ0qy4HKXJlrTwkpwPBtePzi1Gjn+z0Co pMMY0l99KMlpsDaP/H6wUAnWuSV/g1x577YHyon5/m2xILtmN5mXlarjOOgxgknLbkrFn5kjmb6 MBHc= X-Received: by 2002:a2e:9601:0:b0:2df:a177:58e3 with SMTP id 38308e7fff4ca-2e51fe52bbemr103753461fa.13.1715785144444; Wed, 15 May 2024 07:59:04 -0700 (PDT) Received: from stoup.. ([149.14.240.163]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f88111033sm272134645e9.34.2024.05.15.07.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:59:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 5/5] target/arm: Use TCG_COND_TSTNE in gen_cmtst_vec Date: Wed, 15 May 2024 16:59:00 +0200 Message-Id: <20240515145900.252870-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240515145900.252870-1-richard.henderson@linaro.org> References: <20240515145900.252870-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::231; envelope-from=richard.henderson@linaro.org; helo=mail-lj1-x231.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 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 Signed-off-by: Richard Henderson --- target/arm/tcg/gengvec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/arm/tcg/gengvec.c b/target/arm/tcg/gengvec.c index 1d6bc6021d..1895c3b19f 100644 --- a/target/arm/tcg/gengvec.c +++ b/target/arm/tcg/gengvec.c @@ -943,9 +943,7 @@ void gen_cmtst_i64(TCGv_i64 d, TCGv_i64 a, TCGv_i64 b) static void gen_cmtst_vec(unsigned vece, TCGv_vec d, TCGv_vec a, TCGv_vec b) { - tcg_gen_and_vec(vece, d, a, b); - tcg_gen_dupi_vec(vece, a, 0); - tcg_gen_cmp_vec(TCG_COND_NE, vece, d, d, a); + tcg_gen_cmp_vec(TCG_COND_TSTNE, vece, d, a, b); } void gen_gvec_cmtst(unsigned vece, uint32_t rd_ofs, uint32_t rn_ofs,