From patchwork Thu Apr 27 03:31:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2" X-Patchwork-Id: 1774326 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=ctt7bmkI; dkim-atps=neutral Received: from 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q6Lrw1Kflz23vH for ; Thu, 27 Apr 2023 13:32:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 731DC3858C62 for ; Thu, 27 Apr 2023 03:32:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 731DC3858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682566332; bh=P/VV3rfK2jNTNV4Fw46rC+Affy6+ni02ttHtWvJQ0Jo=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ctt7bmkII/CNtiFG2QcekVmWlhMbdbYVj/FfPwfTn5R9FuAjCDsN2h4AvQZiPKYQH 8uiTxYkbvZjnOrtkpJixaQayBDoGeSWogRnLRf72EUvTvp3YqNOX0KBVqcM/nMLI/U wZ6jPqfMuWKvyk/SG4SUyp+/GV++mzWhp7qi00rQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by sourceware.org (Postfix) with ESMTPS id E33603858D20 for ; Thu, 27 Apr 2023 03:31:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E33603858D20 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="344759348" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="344759348" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2023 20:31:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10692"; a="940496490" X-IronPort-AV: E=Sophos;i="5.99,230,1677571200"; d="scan'208";a="940496490" Received: from shvmail02.sh.intel.com ([10.239.244.9]) by fmsmga006.fm.intel.com with ESMTP; 26 Apr 2023 20:31:45 -0700 Received: from pli-ubuntu.sh.intel.com (pli-ubuntu.sh.intel.com [10.239.159.47]) by shvmail02.sh.intel.com (Postfix) with ESMTP id DDF911007CF0; Thu, 27 Apr 2023 11:31:44 +0800 (CST) To: gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, kito.cheng@sifive.com, yanzhang.wang@intel.com, Pan Li Subject: [PATCH] RISC-V: Add required tls to read thread pointer test Date: Thu, 27 Apr 2023 11:31:42 +0800 Message-Id: <20230427033142.949564-1-pan2.li@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Pan Li via Gcc-patches From: "Li, Pan2" Reply-To: pan2.li@intel.com Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" From: Pan Li The read-thread-pointer test may require the gcc configured with --enable-tls. If no, there x4 (aka tp) register will not be presented in the assembly code. This patch requires the tls for the dg checking. It will perform the test checking if --enable-tls and mark the test as unsupported if --disable-tls. Configured with --enable-tls: === gcc Summary === of expected passes 16 Configured with --disable-tls: === gcc Summary === of unsupported tests 8 gcc/testsuite/ChangeLog: * gcc.target/riscv/read-thread-pointer.c: Add required tls. Signed-off-by: Pan Li --- gcc/testsuite/gcc.target/riscv/read-thread-pointer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.target/riscv/read-thread-pointer.c b/gcc/testsuite/gcc.target/riscv/read-thread-pointer.c index 401fb421129..5f460b5f746 100644 --- a/gcc/testsuite/gcc.target/riscv/read-thread-pointer.c +++ b/gcc/testsuite/gcc.target/riscv/read-thread-pointer.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target tls_native } */ void *get_tp() {