From patchwork Thu Jun 6 06:39:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongyu Wang X-Patchwork-Id: 1944447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Wd9sx/0Y; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vvvnd50dTz20PW for ; Thu, 6 Jun 2024 16:39:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E28A390A351 for ; Thu, 6 Jun 2024 06:39:30 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by sourceware.org (Postfix) with ESMTPS id 1746B38A102A for ; Thu, 6 Jun 2024 06:39:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1746B38A102A Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1746B38A102A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717655949; cv=none; b=JpU6j+tDM3K3rJunUvCvAvb8GalQbj0nzc1qt4gtFfTWlK9yQMuwc24uKwliFFtpRvJQIuw5B9ArUsE9rqvlUzJSBJy3xpx5zA6ExHWFkLaHBwFmFTGhYbkLs0VHp+wUI93Tzu5sr0qFnJdLKU5l9UnBIg0KNEdzaGVrde/QQYI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717655949; c=relaxed/simple; bh=oU88BPC2ybgjuzwrkJlEKqCGM+lSRZu4YbuCftKSy7E=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=XG0OknV0AlrssEqifTtlJohQJjklBi1+N4+zeHkGCmE9mo+/jMEjzpUnWRsWkBiaqucXNOJ9ZU+wIoe0c2WHjt8R9DIVDLXZoe/wbOl5rlpWNUguBzmYLzSWNgTPH3BXOMiMATUb28km3I7SLHFPkX0vwGBbGXd99FNlHvnJGZY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717655948; x=1749191948; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oU88BPC2ybgjuzwrkJlEKqCGM+lSRZu4YbuCftKSy7E=; b=Wd9sx/0Y6kkm/EYcfhycnfaxYvVSNGuG6Xqrw5hhEeaQwauF8pzdv/9+ LCh6NGUD6r844DJwypNQcoEVKR+Qg7pQS9O1wW/1OKOkglso3TMj99Gvi i27wFe5mBlKPiggz2Re61rfTA6wxx27bTcQdIRtg0tlgLK6REcu+U30Gm g8duBNvSy5d417VTlAdWfsTjAm4QJYs8Cyduyu5A1XOM6JZgZQx8W5ba/ Maq9qa97kceFxpjOWmF1C1vj3iyfzv6ZdhhmqyUkdwkzQnZZ5yxfnVhLU 4b5v6Sk40Ropa4F44nZQkSDCk4ocMNHYQmtl0tQb7sImlhHOLQkM5tX9U g==; X-CSE-ConnectionGUID: wdoAyXKNQuaqY3lRdh6jsA== X-CSE-MsgGUID: kgMtqpMSSOuBD7iv8q8f5A== X-IronPort-AV: E=McAfee;i="6600,9927,11094"; a="14186013" X-IronPort-AV: E=Sophos;i="6.08,218,1712646000"; d="scan'208";a="14186013" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 23:39:07 -0700 X-CSE-ConnectionGUID: 5B91g9I/QKWxJt+1W4vmvg== X-CSE-MsgGUID: XK7m8IHWSguYx9QNDdx94g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,218,1712646000"; d="scan'208";a="42426610" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmviesa004.fm.intel.com with ESMTP; 05 Jun 2024 23:39:05 -0700 Received: from shliclel4217.sh.intel.com (shliclel4217.sh.intel.com [10.239.240.127]) by shvmail03.sh.intel.com (Postfix) with ESMTP id A92BA10189E0; Thu, 6 Jun 2024 14:39:04 +0800 (CST) From: Hongyu Wang To: gcc-patches@gcc.gnu.org Cc: ubizjak@gmail.com, hongtao.liu@intel.com Subject: [PATCH] [APX] Adjust target-support check [PR 115341] Date: Thu, 6 Jun 2024 14:39:04 +0800 Message-Id: <20240606063904.89249-1-hongyu.wang@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Current target apxf check does not specify sub-features that assembler supports, so the check with older binutils will fail at assemble stage for new apx features like NF,CCMP or CFCMOV. Adjust the assembler check for latest apx subfeatures. Bootstrapped & regtested on x86-64-pc-linux-gnu with binutils 2.42 branch. OK for trunk? gcc/testsuite/ChangeLog: PR target/115341 * lib/target-supports.exp (check_effective_target_apxf): Check for latest apx sub-features. --- gcc/testsuite/lib/target-supports.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 4766104c6d8..6ae716de39d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -10451,7 +10451,9 @@ proc check_effective_target_apxf { } { void foo () { - __asm__ volatile ("add\t%%r16, %%r31" ::); + __asm__ volatile ("{nf} add\t%r16, %r31"); + __asm__ volatile ("cfcmoveq\t%r16, %r31"); + __asm__ volatile ("ccmpleq\t{dfv=sf} %r16, %r31"); } } "-mapxf" ] }