From nobody Wed Nov 13 07:29:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704926869; cv=none; d=zohomail.com; s=zohoarc; b=Yn3RtqIIK8BBBEqJ9RjCI1iuzX2ELelnuAS0YX6Xp8n1TmRDkCq6IE/ZqUPtB+Tso3rJnORUH2ZvR6lt57ommP3SjsS7KNvTKVO5iPnC93LmLK693o6SK7OtUTbiw0EYXg0ZPkkCCOY7nHAY9fie0KAJittRb08jk1voH5jHBks= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704926869; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9zCJMFAqdf2iFGNb4zrA/FuyIMECuUh8qss+ekAKVh8=; b=M6rZNpu69Bxg/qLaIuWFvRGS9fdxsjIel/SeFi9gaozS0VEZAfsao6I7QS3u9klSn6B/sFOGXhg87kOlRqpemDQlt/4RhfsOd7pQe75HpD2mvbie3Zl5DeQGd5mMlU09ZbUohCWQe6ZjT5g9u6Rbcv8cVDAeF9V71Wb+sFPXDNs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704926869441330.06058793922375; Wed, 10 Jan 2024 14:47:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNhLK-0007Eg-1a; Wed, 10 Jan 2024 17:46:38 -0500 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 1rNhKi-0005mH-W8 for qemu-devel@nongnu.org; Wed, 10 Jan 2024 17:46:01 -0500 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNhKh-0003AQ-CO for qemu-devel@nongnu.org; Wed, 10 Jan 2024 17:46:00 -0500 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-4298bdafa54so25704131cf.1 for ; Wed, 10 Jan 2024 14:45:58 -0800 (PST) Received: from stoup.. ([172.58.27.160]) by smtp.gmail.com with ESMTPSA id ks23-20020ac86217000000b0042987f6874bsm2092281qtb.92.2024.01.10.14.45.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 14:45:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704926758; x=1705531558; 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=9zCJMFAqdf2iFGNb4zrA/FuyIMECuUh8qss+ekAKVh8=; b=eLaddh3/aB5stt/DScS0KSsLoZ8h3acGVqTRqmRgc4KwK5+gwE6EJWOUNAUDkMLbdo nWHkYrWcdLe5+EDxzsm6upurAO8dL44+Fl2JvInph0sXzTyVQowBQr83x6wJEWTsg2kq Bjk/gVkFYhijaxAjxw3FJKxT9DUt7yNkorQb21KGhWIB3Y2NPI2EUtppBSCz2Aha7lKW jPniBPGSqUFWoVA7k614EsN0NZb/yuS0vj9/6wUcVFIj0260CxzkoNCO2iYeOQaf/w/W P5ASo5c4xaQkqLzZuILObFsi5E4RDB6iKhzAC99J6sDgQPwAxs3UMv7A/OOgu6Pjnumw tzAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704926758; x=1705531558; 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=9zCJMFAqdf2iFGNb4zrA/FuyIMECuUh8qss+ekAKVh8=; b=syegySttrPZ3WgnxrQCmXetxfzsn3Ja6b3YtsXFGi9CCIjgkdo6lOGNpDudH0ycbI3 x7c9LYJr+rJe2CffP6QSlfmLlET1YToCoxFGAlzM0KL896JB4uP3pW8P3/9wuyxlTjf9 CMDFWAPh62cvBomS/VEuteW730vyv1pWzDM3bujMWaltuepo9mqgM2upQzDdmaJIaBhX aaoBhOW1sYed/IP9fJUfEvs7w3uuod+tbNeu3ja3XbQ0cYW3GDnD7qSESmY06oqLsKi4 qRu8Xe0/57sGmOCaWDdZrGd5wrowRfe8YtYt3wBTUBDEpVTKG2E75YvsmclCUWV/xGee jvug== X-Gm-Message-State: AOJu0YwI5l5TYVvtJtvE9eiz984lCMYaCGsoptTrvuN1mqVzta9iHFAh pG1CAAMSBIY5NHPIieqcUdyUSxlFfw1TKmo/RyjiywuinGRaQ9+a X-Google-Smtp-Source: AGHT+IEawBiEdaZMeqifTfwxd9JRAqgEDGRhJ8DdtGW3ehTqW3C0gCdPEMvAkrVtU+axa4DRCcXq3A== X-Received: by 2002:a05:622a:19a2:b0:429:7fac:a670 with SMTP id u34-20020a05622a19a200b004297faca670mr291082qtc.57.1704926758097; Wed, 10 Jan 2024 14:45:58 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: philmd@linaro.org, pbonzini@redhat.com Subject: [PATCH v3 19/38] tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX Date: Thu, 11 Jan 2024 09:43:49 +1100 Message-Id: <20240110224408.10444-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240110224408.10444-1-richard.henderson@linaro.org> References: <20240110224408.10444-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::836; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x836.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1704926871467100007 Content-Type: text/plain; charset="utf-8" ... and the inverse, CBZ for TSTEQ. Suggested-by: Paolo Bonzini Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tcg/aarch64/tcg-target.c.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 55225313ad..0c98c48f68 100644 --- a/tcg/aarch64/tcg-target.c.inc +++ b/tcg/aarch64/tcg-target.c.inc @@ -1453,6 +1453,7 @@ static void tcg_out_brcond(TCGContext *s, TCGType ext= , TCGCond c, TCGArg a, break; case TCG_COND_LT: case TCG_COND_GE: + /* cmp xN,0; b.mi L -> tbnz xN,63,L */ if (b_const && b =3D=3D 0) { c =3D (c =3D=3D TCG_COND_LT ? TCG_COND_TSTNE : TCG_COND_TSTEQ); tbit =3D ext ? 63 : 31; @@ -1461,6 +1462,13 @@ static void tcg_out_brcond(TCGContext *s, TCGType ex= t, TCGCond c, TCGArg a, break; case TCG_COND_TSTEQ: case TCG_COND_TSTNE: + /* tst xN,0xffffffff; b.ne L -> cbnz wN,L */ + if (b_const && b =3D=3D UINT32_MAX) { + ext =3D TCG_TYPE_I32; + need_cmp =3D false; + break; + } + /* tst xN,1< tbnz xN,B,L */ if (b_const && is_power_of_2(b)) { tbit =3D ctz64(b); need_cmp =3D false; --=20 2.34.1