From patchwork Thu May 23 16:15:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 798442 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a47:0:b0:354:fb4b:99cd with SMTP id t7csp306177wrw; Thu, 23 May 2024 09:17:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUEJPN5PPd52rRc3Fqw/A/f1Fdp5svt2fsx1HQOUx8IpuBqV5OfQGnUR44OVBkkY6revNa7QyJAokckuwGxqfwI X-Google-Smtp-Source: AGHT+IFllJ11yzXKgshmuEBLEwJjVJqzPZCZZB262gAKWxt85KsBFrycmqwrRU/sY+W+jgXJOh5k X-Received: by 2002:a05:6808:1a1b:b0:3c9:cf09:a848 with SMTP id 5614622812f47-3cdb7f8ff2emr7024491b6e.37.1716481071511; Thu, 23 May 2024 09:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716481071; cv=none; d=google.com; s=arc-20160816; b=VE9fWMqwqT7Z3H9DhZawJF4qLHgadoXb7PT0jjPPwX1NlPg7zad6/RpiQJLH9mXe4E 10iOa1bcRiJA6Ls8lyBSuT7TVsY5qmSac+LQ8Z9b8YxrmUyotGgwNtYIlZ77396hugdH 4E4RKWA2ci/iCrg0HLNJtfaQRspCbm5eLsfYNzkegJJi1HMntI9utA8jMDhp1YgF8Vd6 kxWCTc3OXvYUWTD8hMmQVvhgnCTCijZSP9IqhoLAZq63j1iAwYMhr4aiWpyOttC+YC+5 aHBHA+y7d5e9BDVWwMtvA74hvHltklgl7q4lxOWwMZtfVyuBYJL047h8emwMD2tvgaDM nwvA== 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=XFTOPbft/bN6xCHi2Bkanbe02vp6jJNJx4gYp69CKLg=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=KB0vyAbgmTHAZiBKdWdMEsUR6FLvgMjkndJ2BdP6M5meZJJM6jGj5TSdPzL798dcAD FUJYA6EbLcWAP9uU3oD7rW88pEJFQQBYYxKSxtgMvks2YYrmKTvdNFe4KUlgr1EuaUMf 1+mtVDRtw7J2ktdB6SErreEWEBlIljrR4NwJxTRJvz2ePVi5KbZLuqONsnIUgk5EkX3d nS8Bv4k/NB1D2n+1lxDDpVvlxNFS1bOstlAgbVEqgEuASo3oSBpucPc8+zSdaLB55GdT ezkgaDBlynWSNyrKBQ+XBdzWY5NbvjCEhxWXQ3yhAu3lITzVJWWDb1DZCgf4sx0us9gy wyIQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AkwPplFp; 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-48602cfdb1dsi2934521137.31.2024.05.23.09.17.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2024 09:17:51 -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=AkwPplFp; 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 1sAB7I-0005D6-JI; Thu, 23 May 2024 12:16:32 -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 1sAB6q-000519-OJ for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:12 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAB6m-0002Ya-17 for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:04 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6f44a2d1e3dso2609750b3a.3 for ; Thu, 23 May 2024 09:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716480956; x=1717085756; 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=XFTOPbft/bN6xCHi2Bkanbe02vp6jJNJx4gYp69CKLg=; b=AkwPplFpKjPkli1pbEyYxf9G4VH7CliMvQwUv91ENFosjo3mB5nliDnXrNkFNgkGNA /A0r9KoI158FeP0Y4OXLobL1xi20W6LpPIoryUULB8KbnoTSDLWG4y3TueQL/4hOh1Pt 7JD6ZqYPeYQZB1KE5ICy3RITAGftM/ru2fSLD0gQVLWxD3Am5BPHGHovZAJNosWFv20m /6gdUWK0eA6iVObvK8yumFFvr8wC9Fdkarl+eF2Fr75RtT2ZY04OoLEJrDOzwfKFSs6r kJlczEyz4EVrRI+cw7ujl/kLzAyKc63FoQWIMGrqrEKTFMhgITIVT++W89Frmf8BgU6v Y3Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716480956; x=1717085756; 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=XFTOPbft/bN6xCHi2Bkanbe02vp6jJNJx4gYp69CKLg=; b=QYvWfYha6bG/h8nBmPe41aW+KT+6LLJAeHtMHZ0pAfVDzxhZa+BTYrdse/me3jpzzG l76ddl2uqCw9NQrjmD4arnLDasd6Q8e1TAMcOwwJ4YZxpHDgDo2X7oE/aLyNkHZN4rox xBw8/NVECACbkMV3AvL59/+AjvxMWy5ApHSYrxX7brdby52Ihrq8DyBT7jsOvwhFiyE2 x5dZY/qxmSaA9Y1mw68yU36hxcxATsxrcTYv1oSq9J9ZzHpl8shZPY8rbo11mo3MRBSs Uy67A+lDk02Q4bouFQdWQuGR5cvYmdfPWmKgLh/sgDzVvaUJZ4bF3b3Rqr7mh8GECdZS InEw== X-Gm-Message-State: AOJu0YxPJSinv32UAQSy4Y9QAkt9EjzuC1/dtoxqq8F4GXRXB8hU66S2 3HDA0ta+S5FwMRANPj1C8sRinHzWoOivoEI47+iVdI9QKRy2jAsOnR4drJxpxqaoCN7rMTSSqcs b X-Received: by 2002:a05:6a00:929b:b0:6e6:98bf:7b62 with SMTP id d2e1a72fcca58-6f6d60dfae6mr6467087b3a.8.1716480955890; Thu, 23 May 2024 09:15:55 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a9d9acsm24890255b3a.90.2024.05.23.09.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:15:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 1/5] tcg: Introduce TCG_TARGET_HAS_tst_vec Date: Thu, 23 May 2024 09:15:49 -0700 Message-Id: <20240523161553.774673-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240523161553.774673-1-richard.henderson@linaro.org> References: <20240523161553.774673-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- 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 Thu May 23 16:15:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 798438 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a47:0:b0:354:fb4b:99cd with SMTP id t7csp305777wrw; Thu, 23 May 2024 09:17:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLUk1X9wgKudQlxcF/7J1ALcuTgv6WUCgYI394DRMEpQfHrcAZC+fiGT8FaAqAYL4EFkYFYZw8N5Lra2NlYjD9 X-Google-Smtp-Source: AGHT+IFd38Bjs9Yy3V/VibnO6HxoqhVdqfHiOd9Uu099dlL/MThukOuLwtdMWBTz5CR2E5veouO+ X-Received: by 2002:a05:622a:144c:b0:43a:bcd9:5d5d with SMTP id d75a77b69052e-43f9e0c0506mr54507241cf.19.1716481028510; Thu, 23 May 2024 09:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716481028; cv=none; d=google.com; s=arc-20160816; b=M3pPGVAVfV4mk/PxUfX7iZeAs1cOKfyNIVYc7bS1LKZ2rD3dcbylXjO1KnAlX00L0z HkdVhuq41HHMP72S8lRpu3pznUkJGg/wGPYLSMC3DgOjDBwY8kl98czVW4drcoI+o2rk 6yvxupk+zRoFRfaXqq11qA9he1+FGYeHf0w2HvjfJj26ymqDFmsct/uyEHn5hB8/+/YR l0VlT6rhjd5xQ/n9hdXzYmHEuzBC9SyJMZ+tdYvb9VtmyJru7nEHIdzkdbKzYBZDTwGK aqNZots0MvCfWGgtWOqI++rv01sbvkRCRqxxT6DXrVdeErkhYcXZJiRQdXFrpkF9r/5j Do4A== 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:to:from :dkim-signature; bh=UWacmcJvifrn2h1svRsx1ekY33Etna0YPOTwfPRLIos=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=cJts4ucL7D5EeHBYuXW4VaJUW/4Ndv3rLUGhNdB9IsovuG8+/O325KLU74hdT9NLbJ LI3bmkaIrJylpAES4f5fHqfTtAAIboxZOJXArx8E3GIQ84SUTV0F35jKvZVd8hoclySa UYvrneedl3Zo2hvl6PR53q8/ruXCi0Dxz9/Wl/ShtmkxycfChdQSAplPHB+2Ybff3WjU uIwqkZUTz41DrLxnJ2tB3xsnC2BxF+IjuVTn4eqOZhjS9VKjDKzNqY54YLcwfYFlFge3 6kI0krKG6FdZAz2P0dPfI3WvnBc/qvzSkyZgS0Qm6Y94RfH9lQZ2wXuVAAFvQC3Jv/FG CVcA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="V1qSH/PN"; 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-43f7cac0b1esi55144931cf.361.2024.05.23.09.17.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2024 09:17:08 -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="V1qSH/PN"; 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 1sAB77-000595-NQ; Thu, 23 May 2024 12:16: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 1sAB6p-000515-Lu for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:12 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAB6m-0002Yo-0H for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:03 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6f44ed6e82fso2649190b3a.3 for ; Thu, 23 May 2024 09:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716480958; x=1717085758; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UWacmcJvifrn2h1svRsx1ekY33Etna0YPOTwfPRLIos=; b=V1qSH/PNG+eD/VMYQLwL5fvJGKIW9eDZ9sKUrCQTnFpWaYsvIz1oUo7k7PF+ubL34e P862B426wMrhCHrBd/FkLZgEcC3/PrSWRofVhQm3/9sAI1VfiVQ4LuadhS0G1FUqNcgW G8OMZXm4O6UMnWfaqUrbivqkINYetE0tZfPWA7g56VeJBezmK9mmNodbUrKWQJrdw7K0 RwwwlFh4v0dQmC5mfC0VFz8Ss7hI3VPdTAre+gJQ4G4nm7WNtRAuJY3InOfCKtq7StGr m9FL/JX8sTu1BzmBhnerKeeuyVgJA9l+GTakg+co3r5iBbg7uS8jz4Z3/OKFJ2Ex56zk HRvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716480958; x=1717085758; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UWacmcJvifrn2h1svRsx1ekY33Etna0YPOTwfPRLIos=; b=USr0KsmmVT36XgxVRdoCtF7XX3FGlfI9W63qqicHLtfhVeuSQzBZkixR54qMbTfYO/ FlD/ibn4v1swpl55JoYBnuHhv7e1mS6kyaXyTM3U8XSw0jfMIgSwcTABT+TWId9cXcJF MhR2JSqmA3IAoajgy0SCVFwujPJjsi1aej8yytd/jTf3MpANLyfviuSbkUlCQzqhsrsk OiKkFekruWweq5U/Tc+Mf/8oUqPt2c90p/GXgRf0pAn89MKcYBxRK14LFkza+p6UvMeC 7/xoZSjo4UPEkxUa0X37e3ng5KLD42tdEqTyERGgkQrVNbxdNf986KFr5AqNximiBcqO zBpw== X-Gm-Message-State: AOJu0YwJhas6FYN8CpRQgSC8Y0S/g3hLQ1vhVWMRI9gC1T8Z7w0yxYuJ 7nUuHw5/Ima7J664tPuqIsYZmsw/t+iZSIuHKZX0rI+7slDcAmWNwqrT2RuW0GIkd09rwwkWVLQ A X-Received: by 2002:a05:6a21:2792:b0:1b1:ea57:d6ac with SMTP id adf61e73a8af0-1b1f8a749c2mr5167051637.51.1716480957009; Thu, 23 May 2024 09:15:57 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a9d9acsm24890255b3a.90.2024.05.23.09.15.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:15:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 2/5] tcg: Expand TCG_COND_TST* if not TCG_TARGET_HAS_tst_vec Date: Thu, 23 May 2024 09:15:50 -0700 Message-Id: <20240523161553.774673-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240523161553.774673-1-richard.henderson@linaro.org> References: <20240523161553.774673-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.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 --- 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 Thu May 23 16:15:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 798439 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a47:0:b0:354:fb4b:99cd with SMTP id t7csp305871wrw; Thu, 23 May 2024 09:17:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV1C3S8NUR92Dvq41uptpvfEWdsGrKdCC+gxtJXHu8Fnejku8vDmk4GygJtu6D1ldUZuI7K3Bg0DpDcUPaQ5glD X-Google-Smtp-Source: AGHT+IE20OJfvQQtkGdABdkpFfenRnlMARJt+c61FH+UFhWrIxhowSmN3HJppuH5IdVbWFYsZKE8 X-Received: by 2002:a05:6e02:12e8:b0:371:4948:c5e5 with SMTP id e9e14a558f8ab-371fae57ca5mr69200705ab.15.1716481037065; Thu, 23 May 2024 09:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716481037; cv=none; d=google.com; s=arc-20160816; b=NrOseZpE+U9qeDls7oMbSbAsXbbDPfnkjotIsvK0/a8up4fKcVqlmRG0QkakWNVF4A vPv0Pi+91H/PTHR0CcqyQmEqQoY/tEfIMlgiSWf0XSUDY9WQx4cSGQJWMkIszFW6NLMP ZJGS2PsMoAyUvBcSXI6uuEhL8bohkBIRhy1RuT+TgasoC6N7sosZNJbygvQ7/DEwTsqV HpGz3CFVgV/pQKsB+N551BUBYNoLG4notlKLP+UCWvY31yAUJ28af1zlEQ26P0WTB3Cy 3iYKbKzGJAQOj1ggAqM2gMImRQQv4IIt6C/jk0y1fv2P13QkDMbFNw6XxthUWOCyrekt RGqA== 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:to:from :dkim-signature; bh=+UEAzmz2yf/FXZrHjq+7bspL7xDnH65PbwwSYmcMRBs=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=AtUKcDvmiZKV48wNTsDCUcpqQiQPuk1ejKgQM6foQyH7NRw7/IOg1gfJ0fqUs9daX2 X8CXVOFqBeaGvYSOc2uTTDIzPFkbMk+8E0vPc0oLJ+sACDjnG1wVwK7WMSDiYOAV2hDg eDrNTgALcid6K6gl0diXjSNrR5Cx2VsQonFJCPX3ELftqtjmC3a3CsQd7oAw1I8OTI/g U630fpseD0zwYav8+cd+Xfaq66eDdchlhGPPWXksagRI4duNMaOf8zuHbRaJDt1SsZBb FlyZ4K2oYvt7z97/WJ6c/R1bYIeFdfNHTb1JOYjm1jKHBJxsro/MTT/q3d7R3fwfgaeW EloA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="gRPIjRZ/"; 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 a1e0cc1a2514c-8031f96e242si601378241.223.2024.05.23.09.17.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2024 09:17:17 -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="gRPIjRZ/"; 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 1sAB7J-0005Dh-VZ; Thu, 23 May 2024 12:16:34 -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 1sAB6p-00050x-Bz for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:12 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAB6l-0002Yk-Kw for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:03 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6f69422c090so3102485b3a.2 for ; Thu, 23 May 2024 09:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716480958; x=1717085758; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=+UEAzmz2yf/FXZrHjq+7bspL7xDnH65PbwwSYmcMRBs=; b=gRPIjRZ/82jLqMxvnQmgMW3EHB5I2GSy3SoEgELq6Q0JodQOO3rs5SRvMSJxm66fXG JVwzU4irOdHp8df+OmPysZNu8Pn4gJwOZxxW4BztFonNb+i8xjV2kaDJ0qDJ+wpDDaqm Xqlfh+m8t7UKFtRvx6ZvLlUgPvKfhOfTfDnr1QcQThJVlkGhPQ8z7o5gzWYM6rx+0moY 8fnRMAvjCnOg0ZpMp5nsR5feSPhkB704frOOHkCdJd9sHODBvrV1UCWC9ELqOTopdioo PKBzdq2Q1YQvlYKJczts+uUjP60ko/2oFNq6YV3RgzWSXE8Yhc2rR16AjypPHf0tzyl/ 4X6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716480958; x=1717085758; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+UEAzmz2yf/FXZrHjq+7bspL7xDnH65PbwwSYmcMRBs=; b=bmelSAge6Wl0Z1NvJwdPM8VHEjnHIPSsTzgJNuaO2+cTYTFWlThsOWCUYf69324g3B zz7+8Oky5/P0T/gTawgNgYrL6tZqEPbsFiwmMbBvCjqKRr2pPU/vOIdSKWVrwdxtrb2f ZIASdfWT3IWdQxDNLHWT2k1rbXZOdAcsBC/EQ0mAwsaqDe3roUSXf0Q0N8kwx1g7NUZQ uKX/wwwmeW1huivOLTrJyHTocFgnh3POToIGzCFdcrvKauMP9Sq5gpGY41oJ7nngI16V LgZlHsMr7/NbXnj8onk/jTbszloOumoZFywp3b2iD+jqbkSx4LeffWG0Nc/XFQ0gVlz0 QV0Q== X-Gm-Message-State: AOJu0YxClRj6FIenBajey8Ex+nSlsGhk+gN6cxthQu77plJczYjbnuRE plnzX4n2PPIVm5f2yAt+8eEp9I6CUpuHYPkZwlCGcEL3LMPcN+0bOKHflmzdKwlwZOwIt/awyTi c X-Received: by 2002:a05:6300:8084:b0:1af:a37e:367e with SMTP id adf61e73a8af0-1b1f887ebdcmr4909402637.15.1716480957840; Thu, 23 May 2024 09:15:57 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a9d9acsm24890255b3a.90.2024.05.23.09.15.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:15:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 3/5] tcg/aarch64: Support TCG_TARGET_HAS_tst_vec Date: Thu, 23 May 2024 09:15:51 -0700 Message-Id: <20240523161553.774673-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240523161553.774673-1-richard.henderson@linaro.org> References: <20240523161553.774673-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.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 --- 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 Thu May 23 16:15:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 798437 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a47:0:b0:354:fb4b:99cd with SMTP id t7csp305783wrw; Thu, 23 May 2024 09:17:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpXh45khWJmMkoSKpy/ezjN4FZa2Zkn/sv2zMu3sNWaUvpc/dZZpwLezQXkr6sjlTpALLbc25zRmzmArcXwd3c X-Google-Smtp-Source: AGHT+IElHqrkqIG7b3rTndGtMu6qx4OYV+UQ6lNvsvBnaXpS3ks3LaJKxYI/MCRUis+IShNJjGib X-Received: by 2002:a05:6808:19a8:b0:3c9:7022:7545 with SMTP id 5614622812f47-3cdb404f108mr7371659b6e.8.1716481028485; Thu, 23 May 2024 09:17:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716481028; cv=none; d=google.com; s=arc-20160816; b=qQkV2PTE5mERaXNe/mWKob/1rMQcmDuUN2vNQeAlr9CQ4TmMfXcIfeWWH2v3YiwW/0 n3WbwDfgmvfznkkGjwIQhiAjpu3EMr9bF3sEVdRnaYps8L/rUqoj5PqQuW4XaTI+y6TN Naqpoypuf1U5eJ/iHBrktyplWFwPLkLEue3Qf8JLjMws1O3U+f3VE1+vTAHAQdyOST8L DcjxRlFFXv6nCrCYcaWCyKWTo35Am6Cpe0lxZJX/jmmkrXJhaelPfiLVCeUmlQ0jaXga qIJdwz0mJUCkcDNuCyMYkR2aCJLDgDe12sb1b1mw2n0K4dwT/mRhf83iZ4g+cJU1EG+/ Al9A== 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:to:from :dkim-signature; bh=WpiThysDuX7JPl+AhNyZ7t+FQuyygOMAjCR+jn6zrYU=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=bgCmmm4yb1h3+wOwF4p17Lk6RBj5sZKiqv47fl114VTk+FLdaUENVhDhEMoU8DLJAc wZUeLO7tgIsB9Y1ZNC9P4x/uA1+BfDjZ9qfZwhVnFCcuybrGvCHUMvAk8QtJndskIMba fAEfjul+E8k93enOg4NF5H0bdbUN5y4por7y6CWjnWdNCQHu23Qm2KqBTIJITJ8Bs/Vs HpwQzLAslcj6XwpiE2Do5cQire5aA2rnMAMmIkfMJRSAZ7ZoTiYZbUOYxJGJOeVaPWO+ XvswIznSq0dFtTOJRmsR8cKyXkIu8bZlfQLXnS7es/CLvuUuGSUMDqK/Az9zHpf2JFCn xMoQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uRfaNYSw; 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-7948f4de2casi388381085a.548.2024.05.23.09.17.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2024 09:17:08 -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=uRfaNYSw; 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 1sAB7B-0005Aw-Lf; Thu, 23 May 2024 12:16:25 -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 1sAB6p-00050y-D4 for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:12 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAB6m-0002Yt-H6 for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:03 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-6f4dcc3eeb3so2084265b3a.0 for ; Thu, 23 May 2024 09:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716480959; x=1717085759; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WpiThysDuX7JPl+AhNyZ7t+FQuyygOMAjCR+jn6zrYU=; b=uRfaNYSwYeEgN3GdyhYeQT0LrtqnbxvLseKq8Gb/+/3iQbYND5m8HO4Rm898X9mGzw ogOJhs7D+4Rc8332DOf47JNAhiSUs89g75Gi6Q/1gwxgvK03B7He6uX5exSPfWXzR43m OAfgPKKTaxXqzldM4BFk33qVghJnAkeie0+CNxN80nStXWDfphx/DZ4cZgR0inPvDAZn 9xGJZrMaHeuHF/EaCNENUcPLY/3vjEO2PFdejpCUU7XCE/zXt0DrWN+cGCvQ6hmoPlXK RmHvHNESJMeEJrLzqa3K/T01M95r7ZVcAQP3MNP2VXqF/8J3UH18WfhbMI3Maiuz7BE3 Uu9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716480959; x=1717085759; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WpiThysDuX7JPl+AhNyZ7t+FQuyygOMAjCR+jn6zrYU=; b=l1I1frgA1m64SvfHgeURYweQhOPZo0BC7k7c+VEHNvN8LsRnM5OZ5UInBmZ7k8cnmk Cu+NPRnN5ucw28FZYreKdAMT5ALPOhXGAUN9culXqnBpacAFdYbd0dW8oMAK1qhIu831 SDXgnpcrRX+1Nl/K1sHqkwR5f45O/SLXjCoDmp8PBOUrzvClCIv2yHZgKMrlUblYGk8M aJEBdvsD2kTOHB0HfR4B4ZWbmKJDIBU2x60uzHafTisvOF8rdTB+tN6E5+mTVOuq0dIl nT3QFzIECI5ETYJQa/yOQeeNfppCRxgmYsRfsX+GPf6/9Df+/e/k9lFO4f6uOs03pa+W 8igQ== X-Gm-Message-State: AOJu0YzN6ydZzmGtMDVIovvvsT5HC1OcBjeeXwGtc8JUV5lGiQ46tuvq niycRxz3jhdWdO5jQQ0olVNRPAm7OzcLOeTmTE6NWKFHr3m/Bkcb/ie8apDPu5EawLG0dYztcwv X X-Received: by 2002:a05:6a00:2451:b0:6ec:fdcd:18eb with SMTP id d2e1a72fcca58-6f6d61e7b45mr6387362b3a.21.1716480958627; Thu, 23 May 2024 09:15:58 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a9d9acsm24890255b3a.90.2024.05.23.09.15.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:15:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 4/5] tcg/arm: Support TCG_TARGET_HAS_tst_vec Date: Thu, 23 May 2024 09:15:52 -0700 Message-Id: <20240523161553.774673-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240523161553.774673-1-richard.henderson@linaro.org> References: <20240523161553.774673-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42f.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 --- 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 Thu May 23 16:15:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 798441 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a47:0:b0:354:fb4b:99cd with SMTP id t7csp306058wrw; Thu, 23 May 2024 09:17:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVimp9pTjYrDfrTasa5sLX+JcVSbVo8dao5drGpxwbfSCW3rAiQJO+N9x9hpVQP2I7IqNLnQIqZSEWF9hHOU9fK X-Google-Smtp-Source: AGHT+IF7yL4XQRPPn5PXfvrXpTcFeYuqn57o9GqMykgjsHNma+BaLkwhxaNpgvwbWvZ8W4zcF/he X-Received: by 2002:a05:6122:c9e:b0:4df:3558:5ba4 with SMTP id 71dfb90a1353d-4e218571c17mr6443536e0c.6.1716481057555; Thu, 23 May 2024 09:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716481057; cv=none; d=google.com; s=arc-20160816; b=NA6Dm+xsiBDXBTIoMhsKXADl7Ag3GL5ITbVnRjmiFu4WMB936jz4r7IGC9blPgTivg DwJCQTee1GMlL6qYPfqomGIpKOQHkp3w8UeKksmhK3vDsjkGQ+90H3Kxd4xsWhvLSNM6 QDJZyYKlnRIl1vbpx8qmPDFKdg78+5H4niMSA7GQTIhIs7f0erc7L9BA8Et2Ra6cfpPc 1oHLcG9m1TlQNBgyGaA88pFJ1TSb7CAiJnH8nmzh+Le4E4svtHOprjd+T1E5HgrTRsA9 dDzKquAKtrSB2Vs4yeTa2zkK5Qt//EtiQUBO3Hr6Sxq0YcK2KN1F0LxVXpx0gJdQK69L P9qA== 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=/mQMS7XHQY6TkE4rdOTcxfDvk4JYb50U7z9A8FwVzKY=; fh=ud4O1Ydj8kPep7Mkf4OKZprWvK/ZXAvwIEUs1oNffAw=; b=O2mBU9wIZJgT57FhH4N/8KHuPhcWGlpVvt6vUzztujWCz8eMpTPzQPExZui9FPaMfW PDM3dZ1bDggD4pub08BA+ZM2a1fcUTjaYGTr//mAuu0qXPK+P7M4sM0OtXKI9tL75SE+ awwiDBKhC1jzZNUAush4Vl5vM3EfFDKwaIIClmYguUVMyXHdPYTLas8kRHPad+xZsfpQ r9lzBKYiXXfYtu/os6mQoRulajVucFqxeZEqOupjFwKCT9EpPDRnG893nVAN0gwrL0nf OLU3p+4rYsuGcIbC4m4SgIPJLjtxe+SDZSIcgaEzlDoHEwhAJ8sHn5ICX4P2ZAKIrigI t/wA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zYKQvNWm; 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 71dfb90a1353d-4df7c086ce6si5415240e0c.228.2024.05.23.09.17.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 May 2024 09:17:37 -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=zYKQvNWm; 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 1sAB7I-0005D7-K6; Thu, 23 May 2024 12:16:32 -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 1sAB6t-00051i-7f for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:12 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAB6n-0002Yz-DT for qemu-devel@nongnu.org; Thu, 23 May 2024 12:16:06 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6f472d550cbso3351670b3a.1 for ; Thu, 23 May 2024 09:16:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716480959; x=1717085759; 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=/mQMS7XHQY6TkE4rdOTcxfDvk4JYb50U7z9A8FwVzKY=; b=zYKQvNWm/QzWXYRaFtgvS7MEYRGCDkLhNzVPNazCFMZ+iD5CIeZeo8sP7mdnZa6/FG +ogwUeoVeO2fpFoPCEd7nN08bJfCdiNwVtkp2r+Vf35VtZWdil6ulYHkJntWrIWEUvI2 JpWlW7NuoFtLLb/o3dAYHXQn++j6XiweOHLOBmOe85G+4fd/Iv/8Xdi/E4n+txy4xC+b +L98KKdCp4ORGC/TwDvB0nwxrFvRc6OGbVh+pQjFndK51q8h7FiC1z37Tg9XfmAqPh9U z+tJsapP4EQWqDYSehMK4xq6lh//SiyOsbh7k37FwG9G09cbi7nPmqzUO1aOpNCxuV7u 8PZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716480959; x=1717085759; 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=/mQMS7XHQY6TkE4rdOTcxfDvk4JYb50U7z9A8FwVzKY=; b=a466tvrYAXf7pBnmhGDG5RnV0MtBPRb9/dm+xCv8+OkTS0QCTfYW+uDVBpu0A+0pBm 8OFCkCtoVtzacm16rl+WS/96nsD6op9h8X9cAPcdou2KMWXxbjdmh8wLqisIsLuZZRMt oIAm9LHweQ/NLQN/jt3OoM0BW2+vbdhCdYK+bAKKLPCZMNYSqVZIBIpLGUBpA1qr4nvU JUutckbuAGm2Lj+6JlwjzKD/0b7obbA3+pIQhbiIahCcpSsLBPkNocD7osrhv+Fgu1Gm PtXbsA8E8t9jQdGlaqLODEA+ZztUto322JC0ksFuH4bIIvjptxGfQplFdSLlUe5U0E33 h5SQ== X-Gm-Message-State: AOJu0Yx4KU+PTpbNkS9VPHhgzQed+tlkWMVLgAlcnEIIgVC4O1hKrp2Q 7yPyGIBCJ37Dl/QjCsfRitUoO3xd/cAxepvinhADob2e89vYTCfBx5iwfMqxh10mn5YGWP7QGNs e X-Received: by 2002:a05:6a00:1382:b0:6ed:cd4c:cc1a with SMTP id d2e1a72fcca58-6f6d60300b2mr7251615b3a.8.1716480959466; Thu, 23 May 2024 09:15:59 -0700 (PDT) Received: from stoup.. (174-21-72-5.tukw.qwest.net. [174.21.72.5]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2a9d9acsm24890255b3a.90.2024.05.23.09.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 09:15:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Bernhard Beschow , Pierrick Bouvier Subject: [PULL 5/5] accel/tcg: Init tb size and icount before plugin_gen_tb_end Date: Thu, 23 May 2024 09:15:53 -0700 Message-Id: <20240523161553.774673-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240523161553.774673-1-richard.henderson@linaro.org> References: <20240523161553.774673-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.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 When passing disassembly data to plugin callbacks, translator_st_len relies on db->tb->size having been set. Fixes: 4c833c60e047 ("disas: Use translator_st to get disassembly data") Reported-by: Bernhard Beschow Signed-off-by: Richard Henderson Tested-by: Bernhard Beschow Reviewed-by: Pierrick Bouvier --- accel/tcg/translator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index c56967eecd..113edcffe3 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -214,14 +214,14 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, set_can_do_io(db, true); tcg_ctx->emit_before_op = NULL; + /* May be used by disas_log or plugin callbacks. */ + tb->size = db->pc_next - db->pc_first; + tb->icount = db->num_insns; + if (plugin_enabled) { plugin_gen_tb_end(cpu, db->num_insns); } - /* The disas_log hook may use these values rather than recompute. */ - tb->size = db->pc_next - db->pc_first; - tb->icount = db->num_insns; - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM) && qemu_log_in_addr_range(db->pc_first)) { FILE *logfile = qemu_log_trylock();