From nobody Mon Nov 25 12:35:14 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1715511178; cv=none; d=zohomail.com; s=zohoarc; b=hCJiqTyhMJfdctlbf/Fl0gDmOrFNOWR9WLxJk6Axy/8eTsH7xl3GxaifxVwkYcs7WOOId+waIfRGIeUPy3UyKr+G2DdsKxVegDxRoqlVEfG5yO8iNAeQWZ+yYJIMrjQ8jw26DUxn7RI4KAuTylrj03OyABgmqJXtc1LfVfNNFkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1715511178; h=Content-Type: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=U2fiowOrMJl+aWIwJB0KTwv9oVXdfrjHf/yTatgQmpY=; b=DHGCRole6ILiuqA13B7+lBUQAGT8coSEUzJpndiSLkB2gSxcOBMP5Q2XoXJ37on+9j70K0Sh5c3YW7TQ1khi4sKMmqpeAFAkEz89UNaZB9PW9g8T3SWedZNLrebQaeBdReMOqt1TUoZEgTQKOa6xCHdeXy2nUUETJWGQNqnru0M= 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 1715511178836148.8676638349416; Sun, 12 May 2024 03:52:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s66mV-0003Dm-Vo; Sun, 12 May 2024 06:50:16 -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 1s66mR-0003Be-G0 for qemu-devel@nongnu.org; Sun, 12 May 2024 06:50:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s66mP-0005la-V3 for qemu-devel@nongnu.org; Sun, 12 May 2024 06:50:11 -0400 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-121-uhxL6gBdMAGfKzxEbK4_OQ-1; Sun, 12 May 2024 06:50:07 -0400 Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a5a180153aeso225299866b.3 for ; Sun, 12 May 2024 03:50:07 -0700 (PDT) Received: from avogadro.local ([151.95.155.52]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a179c7d92sm447881566b.98.2024.05.12.03.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 03:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715511009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U2fiowOrMJl+aWIwJB0KTwv9oVXdfrjHf/yTatgQmpY=; b=Sbr+sD0n+4aJ1+5oez2Dj1o9Qq+aNL/ok0cSjAt6zNlOEdpoMA1yK4P+39aoP1dGLftXjJ fm4rwMydwmbzOUxRC3ujLTrge5AVF0v8vr3SxraFSdZlqxy8ICZNi0517GdvRjDIGxubFI jZa+tC1L0PSabwZiiqJBqa7R6Ojiywc= X-MC-Unique: uhxL6gBdMAGfKzxEbK4_OQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715511005; x=1716115805; 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=U2fiowOrMJl+aWIwJB0KTwv9oVXdfrjHf/yTatgQmpY=; b=Py3WWIyZuKn7VrGXzaw2mIAuHREjpobj5suvvhaYvws8fRKjLVYoPolZIWRumJBRWo UhHG1jffxriuoozL4zxhu4LBj69p++kBo+wle9fKJL4UDH+mm/hHHAHSI1Vd+oDbDgTF ocTirlzjmQ1Spe5oymJxZpRuRtj+J2vWr8SEtK566/uOVKM+q7xqTGobgAnkKwQFZ9wW 7DNPNaXlpRM/Hpk3/o6hjQ2usMVJaXQkus6Z9lun9DxFUjHs/rDkG3AWQdPXYrNcpepY mATcUmKbg8o/Mo4s5xWkQ+pQF6UmbHelPT6mI1746VLFMzwqm5/gGh5SwOZ2e2VbWVo3 GB0g== X-Gm-Message-State: AOJu0YwL9+zzo/lt8ll7SRCrWxCkHdQjapMemK1gAmDDVXjwkfAmJruG E2MduxXJoKDmsEqZiRNuaDirkwOORhCstfqhg4knLX77OvW4+097+SNHg/ghilLiKB1U0AN88ff 0NXaTzwvSaNo2iKufvTU9kQBqtvDAmMUUxJng6cpKA0c5wysfJTt/1p3NYWHa2aDMLztfFc4iGQ 6Y2ZhKebQDvDaLnW33uQi/YHf9jSsXOZbkEwaY X-Received: by 2002:a17:906:4a42:b0:a51:a288:5af9 with SMTP id a640c23a62f3a-a5a2d641836mr465376466b.51.1715511005003; Sun, 12 May 2024 03:50:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEC2afxrkFrpA7HhG28VBRb/m+jKUf3frH+xqy+uBvewVAh3STdCQf+odWeYxVnkxkgpaC+8A== X-Received: by 2002:a17:906:4a42:b0:a51:a288:5af9 with SMTP id a640c23a62f3a-a5a2d641836mr465375566b.51.1715511004642; Sun, 12 May 2024 03:50:04 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Zhao Liu Subject: [PULL 06/27] tests/tcg: cover lzcnt/tzcnt/popcnt Date: Sun, 12 May 2024 12:49:24 +0200 Message-ID: <20240512104945.130198-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240512104945.130198-1-pbonzini@redhat.com> References: <20240512104945.130198-1-pbonzini@redhat.com> 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=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.587, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1715511180104100003 Content-Type: text/plain; charset="utf-8" Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- tests/tcg/i386/test-i386.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index 864c4e620d5..ce3bf74b5a8 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386.c @@ -715,6 +715,30 @@ void test_mul(void) printf("%-10s A=3D" FMTLX " R=3D" FMTLX " %ld\n", #op, val, res, resz)= ;\ } =20 +void test_xcnt(void) +{ + TEST_BSX(tzcntw, "w", 0); + TEST_BSX(tzcntw, "w", 0x12340128); + TEST_BSX(lzcntw, "w", 0); + TEST_BSX(lzcntw, "w", 0x12340128); + TEST_BSX(popcntw, "w", 0); + TEST_BSX(popcntw, "w", 0x12340128); + TEST_BSX(tzcntl, "k", 0); + TEST_BSX(tzcntl, "k", 0x00340128); + TEST_BSX(lzcntl, "k", 0); + TEST_BSX(lzcntl, "k", 0x00340128); + TEST_BSX(popcntl, "k", 0); + TEST_BSX(popcntl, "k", 0x00340128); +#if defined(__x86_64__) + TEST_BSX(tzcntq, "", 0); + TEST_BSX(tzcntq, "", 0x003401281234); + TEST_BSX(lzcntq, "", 0); + TEST_BSX(lzcntq, "", 0x003401281234); + TEST_BSX(popcntq, "", 0); + TEST_BSX(popcntq, "", 0x003401281234); +#endif +} + void test_bsx(void) { TEST_BSX(bsrw, "w", 0); @@ -2162,6 +2186,7 @@ int main(int argc, char **argv) func(); } test_bsx(); + test_xcnt(); test_mul(); test_jcc(); test_loop(); --=20 2.45.0