From patchwork Tue Apr 26 11:34:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Segher Boessenkool X-Patchwork-Id: 53222 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E29793857353 for ; Tue, 26 Apr 2022 11:34:34 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from gcc1-power7.osuosl.org (gcc1-power7.osuosl.org [140.211.15.137]) by sourceware.org (Postfix) with ESMTP id B2F253858D37 for ; Tue, 26 Apr 2022 11:34:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B2F253858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gcc1-power7.osuosl.org Received: by gcc1-power7.osuosl.org (Postfix, from userid 10019) id 9896C124060B; Tue, 26 Apr 2022 11:34:17 +0000 (UTC) From: Segher Boessenkool To: gcc-patches@gcc.gnu.org Subject: [PATCH] rs6000: Make the has_arch target selectors actually work Date: Tue, 26 Apr 2022 11:34:15 +0000 Message-Id: X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Cc: Segher Boessenkool , dje.gcc@gmail.com, "Kewen.Lin" Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Tested on powerpc64-linux {-m32,-m64}. Also manually checked the gcc.log; it did the wrong thing before, it does the right thing now. Committing. Segher 2022-04-26 Segher Boessenkoool gcc/testsuite/ PR target/105349 * lib/target-supports.exp (check_effective_target_has_arch_pwr5): Use the specified dg-options. (check_effective_target_has_arch_pwr6): Ditto. (check_effective_target_has_arch_pwr7): Ditto. (check_effective_target_has_arch_pwr8): Ditto. (check_effective_target_has_arch_pwr9): Ditto. (check_effective_target_has_arch_pwr10): Ditto. (check_effective_target_has_arch_ppc64): Ditto. --- gcc/testsuite/lib/target-supports.exp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 902bdae8a441..2d5d0539bb4f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6319,73 +6319,73 @@ proc check_effective_target_powerpc_p9modulo_ok { } { # return 1 if our compiler returns the ARCH_PWR defines with the options # as provided by the test. proc check_effective_target_has_arch_pwr5 { } { - return [check_no_compiler_messages arch_pwr5 assembly { + return [check_no_compiler_messages_nocache arch_pwr5 assembly { #ifndef _ARCH_PWR5 #error does not have power5 support. #else /* "has power5 support" */ #endif - }] + } [current_compiler_flags]] } proc check_effective_target_has_arch_pwr6 { } { - return [check_no_compiler_messages arch_pwr6 assembly { + return [check_no_compiler_messages_nocache arch_pwr6 assembly { #ifndef _ARCH_PWR6 #error does not have power6 support. #else /* "has power6 support" */ #endif - }] + } [current_compiler_flags]] } proc check_effective_target_has_arch_pwr7 { } { - return [check_no_compiler_messages arch_pwr7 assembly { + return [check_no_compiler_messages_nocache arch_pwr7 assembly { #ifndef _ARCH_PWR7 #error does not have power7 support. #else /* "has power7 support" */ #endif - }] + } [current_compiler_flags]] } proc check_effective_target_has_arch_pwr8 { } { - return [check_no_compiler_messages arch_pwr8 assembly { + return [check_no_compiler_messages_nocache arch_pwr8 assembly { #ifndef _ARCH_PWR8 #error does not have power8 support. #else /* "has power8 support" */ #endif - }] + } [current_compiler_flags]] } proc check_effective_target_has_arch_pwr9 { } { - return [check_no_compiler_messages arch_pwr9 assembly { + return [check_no_compiler_messages_nocache arch_pwr9 assembly { #ifndef _ARCH_PWR9 #error does not have power9 support. #else /* "has power9 support" */ #endif - }] + } [current_compiler_flags]] } proc check_effective_target_has_arch_pwr10 { } { - return [check_no_compiler_messages arch_pwr10 assembly { + return [check_no_compiler_messages_nocache arch_pwr10 assembly { #ifndef _ARCH_PWR10 #error does not have power10 support. #else /* "has power10 support" */ #endif - }] + } [current_compiler_flags]] } proc check_effective_target_has_arch_ppc64 { } { - return [check_no_compiler_messages arch_ppc64 assembly { + return [check_no_compiler_messages_nocache arch_ppc64 assembly { #ifndef _ARCH_PPC64 #error does not have ppc64 support. #else /* "has ppc64 support" */ #endif - }] + } [current_compiler_flags]] } # Return 1 if this is a PowerPC target supporting -mcpu=power10.