From patchwork Mon Nov 13 14:26:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863215 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=8.43.85.97; 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 [8.43.85.97]) (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 4STWws32fzz1yRD for ; Tue, 14 Nov 2023 01:27:41 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0085D3940CE8 for ; Mon, 13 Nov 2023 14:27:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 7A68F3856962 for ; Mon, 13 Nov 2023 14:27:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A68F3856962 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7A68F3856962 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885645; cv=none; b=t1nKkystkdlzUfhMql7mmiTfmrhKWehY/z7RQAjH7EL7jAG03fVrFnrsqGMFKUj+LLaI2+fqzZjCOohBxdia6RolcxgZY2jhXPDfizgl75rql60KEUJ4aMxck50MMD1L6VQMvCEPHPO3jylQ8jT+YBH/jayKm1aF6PgrpwaVuqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885645; c=relaxed/simple; bh=QkuyDKyH+q5L/BaLFgZGebBxEIIR1798FHr+3BpoxqA=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=HtfX/ktQSjGvKKSPmdIKFBVhdoW4/a/Z/DczVH+KB6yTntuBSm13FtamU2Azow7Irrljvsqz0Ylbiut9Q/aO7IbSal1D2MVN+XZDYDA4Cwmn6j8jPNezUi+t9/rQdRb0+uEwrrxhVNWHxcDJZN3CtDbo4M6JA8dTCab6k3Cx2zU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A6F8F1007; Mon, 13 Nov 2023 06:28:09 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B7D5B3F7B4; Mon, 13 Nov 2023 06:27:23 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 01/22] arm: testsuite: correctly detect armv6t2 hardware for acle execution tests Date: Mon, 13 Nov 2023 14:26:37 +0000 Message-Id: <20231113142658.69039-2-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Some of the ACLE tests for Arm are executable, but we were only testing that the compiler could generate code for them, not that the hardware was capable of executing them. Fix this by adding an execution test for suitable hardware. gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_v6t2_hw_ok): New function. * gcc.target/arm/acle/data-intrinsics-armv6.c: Use it. * gcc.target/arm/acle/data-intrinsics-rbit.c: Likewise. --- .../arm/acle/data-intrinsics-armv6.c | 2 +- .../gcc.target/arm/acle/data-intrinsics-rbit.c | 2 +- gcc/testsuite/lib/target-supports.exp | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c index 988ecac3787..6dc8c55e2f9 100644 --- a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c +++ b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-armv6.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-require-effective-target arm_arch_v6t2_ok } */ +/* { dg-require-effective-target arm_arch_v6t2_hw_ok } */ /* { dg-add-options arm_arch_v6t2 } */ #include "arm_acle.h" diff --git a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c index d1fe274b5ce..b01c4219a7e 100644 --- a/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c +++ b/gcc/testsuite/gcc.target/arm/acle/data-intrinsics-rbit.c @@ -1,6 +1,6 @@ /* Test the ACLE data intrinsics existence for specific instruction. */ /* { dg-do run } */ -/* { dg-require-effective-target arm_arch_v6t2_ok } */ +/* { dg-require-effective-target arm_arch_v6t2_hw_ok } */ /* { dg-additional-options "--save-temps -O1" } */ /* { dg-add-options arm_arch_v6t2 } */ /* { dg-final { check-function-bodies "**" "" "" } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 1a7bea96c1e..d414cddf4dc 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5590,6 +5590,24 @@ proc check_effective_target_arm_thumb1_cbz_ok {} { } } +# Return 1 if this is an Arm target which supports the Armv6t2 extensions. +# This can be either in Arm state or in Thumb state. + +proc check_effective_target_arm_arch_v6t2_hw_ok {} { + if [check_effective_target_arm_thumb1_ok] { + return [check_no_compiler_messages arm_movt object { + int + main (void) + { + asm ("bfc r0, #1, #2"); + return 0; + } + } [add_options_for_arm_arch_v6t2 ""]] + } else { + return 0 + } +} + # Return 1 if this is an ARM target where ARMv8-M Security Extensions is # available. From patchwork Mon Nov 13 14:26:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863217 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=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 4STWwx0Hp0z1yRm for ; Tue, 14 Nov 2023 01:27:45 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A99CE3938C3F for ; Mon, 13 Nov 2023 14:27:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 3DFCA38618A2 for ; Mon, 13 Nov 2023 14:27:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3DFCA38618A2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3DFCA38618A2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885646; cv=none; b=sRP7OROZyB03xwI9KvkXUMmuqKfl4WtM7YheIk05l2WWTrG0tKHEoJphzFZgNa0vVy2vL94ACnF/P74xcNUijfEYl1YoN6zwj/zuDp0d8J2KDYuh8ybDxQpJbGr0BhtX/dR5IiJGD0bJp8YkwNwPlSvGKUyGYc5ViNQhddbsFuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885646; c=relaxed/simple; bh=WynT6Oq/B43Sc7si64hKZDvyIJx7OjTFXGvpijfQfSI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=JnalE/9UjfXzM8tzKz4a46eGPbVm+VLG328CBHvT8zPBTHaJ91E/E+mA7ISDf8k/mHqbj214cBFvUlfAtJSnOZ6oH34Te702aCzQig0RxWGK5IwqlMg5k4mj6EGQio3ycuTofx9Vld2XizRSQWQa/zpqo8nDLFzDYLyC8KGtjd8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 62414150C; Mon, 13 Nov 2023 06:28:10 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 740D53F7B4; Mon, 13 Nov 2023 06:27:24 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 02/22] arm: testsuite: correctly detect hard_float Date: Mon, 13 Nov 2023 14:26:38 +0000 Message-Id: <20231113142658.69039-3-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Add an arm-specific test to check_effective_target_hard_float for Arm to handle cases where we only have single-precision FP in hardware. gcc/testsuite: * lib/target-supports.exp (check_effective_target_hard_float): Add arm-specific test. --- gcc/testsuite/lib/target-supports.exp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d414cddf4dc..ee173b9fb6b 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1420,6 +1420,17 @@ proc check_effective_target_mpaired_single { args } { # Return true if the target has access to FPU instructions. proc check_effective_target_hard_float { } { + # This should work on cores that only have single-precision, + # and should also correctly handle legacy cores that had thumb1 and + # lacked FP support for that, but had it in Arm state. + if { [istarget arm*-*-*] } { + return [check_no_compiler_messages hard_float assembly { + #if __ARM_FP == 0 + #error __arm_soft_float + #endif + }] + } + if { [istarget loongarch*-*-*] } { return [check_no_compiler_messages hard_float assembly { #if (defined __loongarch_soft_float) From patchwork Mon Nov 13 14:26:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863221 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=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 4STWxm6RqPz1yRD for ; Tue, 14 Nov 2023 01:28:28 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 626ED3892D67 for ; Mon, 13 Nov 2023 14:28:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id EC61838E08CD for ; Mon, 13 Nov 2023 14:27:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC61838E08CD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EC61838E08CD Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885647; cv=none; b=qeO+/hIfzawVZssVS4TYV2Pim3R9v8pbNOd3PdrTwghcPKAkTCJTfSfhFVXNGTeSlmrBrc1BbElOt7ycK9BihlBT1+TXABuYOzXAywDxEfaeSxAuoW9zEtbnXQFvvPHCjF3szN82PHL/lNSgQqVDs1DSUjLGGJudY1n1i1N2JxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885647; c=relaxed/simple; bh=fEQceVrYcWOJ9a1Y1jtg6PWbdkzR1I10lSZwxWn4yNY=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=h5+B6roenOhnRMFtchj5QmyY4YlUt5e+Kv2MwoI1hrWI+UeoHRMucFBlPUsnS3laveudWJDVbdK9yxsIsH4j9L0crPaAOQwv0+vu4wpkpNV8UCTaQw48rjH4+wJMgwbvtXqVfWCCNsPWpEteY9EeSy5gicpkrvT5vucN38iauSQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1DC08152B; Mon, 13 Nov 2023 06:28:11 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2FB033F7B4; Mon, 13 Nov 2023 06:27:25 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 03/22] arm: testsuite: avoid hard-float ABI incompatibility with -march Date: Mon, 13 Nov 2023 14:26:39 +0000 Message-Id: <20231113142658.69039-4-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 A number of tests in the gcc testsuite, especially for arm-specific targets, add various flags to control the architecture. These run into problems when the compiler is configured with -mfpu=auto if the new architecture lacks an architectural feature that implies we have floating-point instructions. The testsuite makes this worse as it falls foul of this requirement in the base architecture strings provided by target-supports.exp. To fix this we add "+fp", or something equivalent to this, to all the base architecture specifications. The feature will be ignored if the float ABI is set to soft. gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): Add base FPU specifications to all architectures that can support one. --- gcc/testsuite/lib/target-supports.exp | 50 +++++++++++++-------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ee173b9fb6b..7d83bd8740f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5408,36 +5408,36 @@ foreach { armfunc armflag armdefs } { v5t "-march=armv5t -mfloat-abi=softfp" __ARM_ARCH_5T__ v5t_arm "-march=armv5t -marm" __ARM_ARCH_5T__ v5t_thumb "-march=armv5t -mthumb -mfloat-abi=softfp" __ARM_ARCH_5T__ - v5te "-march=armv5te -mfloat-abi=softfp" __ARM_ARCH_5TE__ - v5te_arm "-march=armv5te -marm" __ARM_ARCH_5TE__ - v5te_thumb "-march=armv5te -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__ - v6 "-march=armv6 -mfloat-abi=softfp" __ARM_ARCH_6__ - v6_arm "-march=armv6 -marm" __ARM_ARCH_6__ - v6_thumb "-march=armv6 -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__ - v6k "-march=armv6k -mfloat-abi=softfp" __ARM_ARCH_6K__ - v6k_arm "-march=armv6k -marm" __ARM_ARCH_6K__ - v6k_thumb "-march=armv6k -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__ - v6t2 "-march=armv6t2" __ARM_ARCH_6T2__ - v6z "-march=armv6z -mfloat-abi=softfp" __ARM_ARCH_6Z__ - v6z_arm "-march=armv6z -marm" __ARM_ARCH_6Z__ - v6z_thumb "-march=armv6z -mthumb -mfloat-abi=softfp" __ARM_ARCH_6Z__ + v5te "-march=armv5te+fp -mfloat-abi=softfp" __ARM_ARCH_5TE__ + v5te_arm "-march=armv5te+fp -marm" __ARM_ARCH_5TE__ + v5te_thumb "-march=armv5te+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__ + v6 "-march=armv6+fp -mfloat-abi=softfp" __ARM_ARCH_6__ + v6_arm "-march=armv6+fp -marm" __ARM_ARCH_6__ + v6_thumb "-march=armv6+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__ + v6k "-march=armv6k+fp -mfloat-abi=softfp" __ARM_ARCH_6K__ + v6k_arm "-march=armv6k+fp -marm" __ARM_ARCH_6K__ + v6k_thumb "-march=armv6k+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__ + v6t2 "-march=armv6t2+fp" __ARM_ARCH_6T2__ + v6z "-march=armv6z+fp -mfloat-abi=softfp" __ARM_ARCH_6Z__ + v6z_arm "-march=armv6z+fp -marm" __ARM_ARCH_6Z__ + v6z_thumb "-march=armv6z+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6Z__ v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__ - v7a "-march=armv7-a" __ARM_ARCH_7A__ - v7r "-march=armv7-r" __ARM_ARCH_7R__ + v7a "-march=armv7-a+fp" __ARM_ARCH_7A__ + v7r "-march=armv7-r+fp" __ARM_ARCH_7R__ v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__ - v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__ - v7ve "-march=armv7ve -marm" + v7em "-march=armv7e-m+fp -mthumb" __ARM_ARCH_7EM__ + v7ve "-march=armv7ve+fp -marm" "__ARM_ARCH_7A__ && __ARM_FEATURE_IDIV" - v8a "-march=armv8-a" __ARM_ARCH_8A__ - v8a_hard "-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard" __ARM_ARCH_8A__ - v8_1a "-march=armv8.1-a" __ARM_ARCH_8A__ - v8_2a "-march=armv8.2-a" __ARM_ARCH_8A__ - v8r "-march=armv8-r" __ARM_ARCH_8R__ + v8a "-march=armv8-a+simd" __ARM_ARCH_8A__ + v8a_hard "-march=armv8-a+simd -mfpu=auto -mfloat-abi=hard" __ARM_ARCH_8A__ + v8_1a "-march=armv8.1-a+simd" __ARM_ARCH_8A__ + v8_2a "-march=armv8.2-a+simd" __ARM_ARCH_8A__ + v8r "-march=armv8-r+fp.sp" __ARM_ARCH_8R__ v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft" __ARM_ARCH_8M_BASE__ - v8m_main "-march=armv8-m.main -mthumb" __ARM_ARCH_8M_MAIN__ - v8_1m_main "-march=armv8.1-m.main -mthumb" __ARM_ARCH_8M_MAIN__ - v9a "-march=armv9-a" __ARM_ARCH_9A__ } { + v8m_main "-march=armv8-m.main+fp -mthumb" __ARM_ARCH_8M_MAIN__ + v8_1m_main "-march=armv8.1-m.main+fp -mthumb" __ARM_ARCH_8M_MAIN__ + v9a "-march=armv9-a+simd" __ARM_ARCH_9A__ } { eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] { proc check_effective_target_arm_arch_FUNC_ok { } { return [check_no_compiler_messages arm_arch_FUNC_ok assembly { From patchwork Mon Nov 13 14:26:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863220 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=8.43.85.97; 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 [8.43.85.97]) (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 4STWxd1pz6z1yRD for ; Tue, 14 Nov 2023 01:28:21 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6A96F38B67A2 for ; Mon, 13 Nov 2023 14:28:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id AE59738E08D4 for ; Mon, 13 Nov 2023 14:27:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE59738E08D4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AE59738E08D4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885647; cv=none; b=Z/e4SBNMP3+cG9UN80TMhYPwDZBqsMiYsjVdv6/7of/Y0cfhWy2C4pL9wUtcjFeoMHtXBh6cgtk4g3FyeIYme0WSz2b/dW9YP3u7rCqSYUJeivOmBOdkwvc5b+RUVyWX3Ow7g1WtC7FBPjIdWNyarhlAo8O3fkFH0pw/zmMcn5w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885647; c=relaxed/simple; bh=cX7XT9dVfFaD9/lRsSQP7NEp25ZbNydMDPqDGIhBpVc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=dnd9wd9jZhpJAFO4IjF0kTjwwkrfBAGgczRI7iwb+uJWRMJqrLU2xK+elekmBbrYH6Smw4f6hy71U1BIX9PRoC1Mps5zEtBIs2lyJBrV3lCZKJ1Ot3Z/L57RxRkTBMy1JOO+XOSHDhba3CxeoFpotjxrtOWJ7vAq2vK3bR9z57k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CCE53FEC; Mon, 13 Nov 2023 06:28:11 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DEE4C3F7B4; Mon, 13 Nov 2023 06:27:25 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 04/22] arm: testsuite: avoid problems with -mfpu=auto in pacbti-m-predef-11.c Date: Mon, 13 Nov 2023 14:26:40 +0000 Message-Id: <20231113142658.69039-5-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This test overrides the architecture, but fails to describe which floating-point features are needed. This causes problems if the ABI requires FP for parameter passing and -mfpu=auto is selected, so ensure that one is specified. gcc/testsuite: * gcc.target/arm/acle/pacbti-m-predef-11.c: Add +fp to the -march specification. --- gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c index 9f2711097ac..6a5ae92c567 100644 --- a/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c +++ b/gcc/testsuite/gcc.target/arm/acle/pacbti-m-predef-11.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" "-mfloat-abi=*" } } */ -/* { dg-options "-march=armv8.1-m.main+pacbti" } */ +/* { dg-options "-march=armv8.1-m.main+fp+pacbti" } */ #if (__ARM_FEATURE_BTI != 1) #error "Feature test macro __ARM_FEATURE_BTI_DEFAULT should be defined to 1." From patchwork Mon Nov 13 14:26:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863225 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=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 4STWyV07rcz1yRD for ; Tue, 14 Nov 2023 01:29:06 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 581363986436 for ; Mon, 13 Nov 2023 14:28:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 59CE538B67B2 for ; Mon, 13 Nov 2023 14:27:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 59CE538B67B2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 59CE538B67B2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885648; cv=none; b=FR0yxpPBAV3TJ0lLGCM+fheomxsdFp6D7aW8CbLZglE5Bsq51Aari+Iqt4Mb5S/Kij39MN7vdJUFhIxxTgMxeEUD49EUc6gix9GjhqV0aZyBebDaW6fSPOn5pbkVFKiO+gPx7MgoxIRA/k4mtDx/pY+B3OeCTCAZ57zP0xywr7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885648; c=relaxed/simple; bh=HHatzkMr7TFmEoFkqEBaoxPQD9lHj9ZTcgiVgFLGPbM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=YJYVHeLv9Q/b7VYI20kzDfja5PJYVM2K733mn+/HxzVhmVvb0YTNIlQqOECWKWx9Z26OvNsrLKnWqyM1EjT+1TsO/cUuhZpi7QAK1UAseMfUdS8/oCwv/SGW3PHEz0AbNGv6yHyFNhIEiE3Or6M60ui/HNcai+Q0A7hTyew9YsM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 89CA61007; Mon, 13 Nov 2023 06:28:12 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9A24F3F7B4; Mon, 13 Nov 2023 06:27:26 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 05/22] arm: testsuite: avoid problems with -mfpu=auto in attr-crypto.c Date: Mon, 13 Nov 2023 14:26:41 +0000 Message-Id: <20231113142658.69039-6-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This test overrides the architecture, but fails to describe which floating-point features are needed. This causes problems if the ABI requires FP for parameter passing and -mfpu=auto is selected, so ensure that one is specified. gcc/testsuite: * gcc.target/arm/attr-crypto.c: Add +simd to the -march specification. --- gcc/testsuite/gcc.target/arm/attr-crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/attr-crypto.c b/gcc/testsuite/gcc.target/arm/attr-crypto.c index 05e458f36b6..3959d0b67e7 100644 --- a/gcc/testsuite/gcc.target/arm/attr-crypto.c +++ b/gcc/testsuite/gcc.target/arm/attr-crypto.c @@ -3,7 +3,7 @@ pragma. */ /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_fp_ok } */ -/* { dg-options "-O2 -march=armv8-a" } */ +/* { dg-options "-O2 -march=armv8-a+simd" } */ /* { dg-add-options arm_fp } */ /* Reset fpu to a value compatible with the next pragmas. */ From patchwork Mon Nov 13 14:26:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863222 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=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 4STWxn1nLNz1yRm for ; Tue, 14 Nov 2023 01:28:29 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 01BC53892D5F for ; Mon, 13 Nov 2023 14:28:16 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 05217392C290 for ; Mon, 13 Nov 2023 14:27:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 05217392C290 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 05217392C290 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885649; cv=none; b=KU5FTU1i6ELGC8gU0VfvqtfRI8KGvk6ZbY91XNWluioiYKz8cJGA8x1/bDtuT7Aj9U9u271wjVLLA+aTtuS9uP88MS3DjWy/4kN4AsbZgZtJa2yBNM+0QKPkU2SnzHod65RfqtFeyhx5X5tHmRl/4rdlCZKsV5gQcDHrqPwLWiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885649; c=relaxed/simple; bh=+BQU6GbSpt9sjagqX/Y0UqBVhu8gwT61QWWL5ovY7K0=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=ph3xo60Gfwt0zEMLKo0gIoQQCaTpI/DJd5eXZwBaZ2Yh4cNQ1Rx29hO7tDPN3+ZV9D1NR8C3TSuB1pokLQyJUc62DGWWFRlSkgcdpZr4JWWlPWk/TjPLvoS9c1tV1hsQxQeDW7zXo4jN4st0rO3tI+IHVzj0JQzmE4EamjDlEoM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 47F50FEC; Mon, 13 Nov 2023 06:28:13 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 56D433F7B4; Mon, 13 Nov 2023 06:27:27 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 06/22] arm: testsuite: avoid problems with -mfpu=auto in attr_thumb-static2.c Date: Mon, 13 Nov 2023 14:26:42 +0000 Message-Id: <20231113142658.69039-7-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This test overrides the architecture, but fails to describe which floating-point features are needed. This causes problems if the ABI requires FP for parameter passing and -mfpu=auto is selected, so ensure that one is specified. gcc/testsuite: * gcc.target/arm/attr_thumb-static2.c: Add +fp to the -march specification. --- gcc/testsuite/gcc.target/arm/attr_thumb-static2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/attr_thumb-static2.c b/gcc/testsuite/gcc.target/arm/attr_thumb-static2.c index 77454343b23..a38f9a95607 100644 --- a/gcc/testsuite/gcc.target/arm/attr_thumb-static2.c +++ b/gcc/testsuite/gcc.target/arm/attr_thumb-static2.c @@ -2,7 +2,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v7a_ok } */ -/* { dg-options "-O0 -march=armv7-a" } */ +/* { dg-options "-O0 -march=armv7-a+fp" } */ struct _NSPoint { From patchwork Mon Nov 13 14:26:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863218 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=8.43.85.97; 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 [8.43.85.97]) (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 4STWx83BMrz1yRD for ; Tue, 14 Nov 2023 01:27:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AFAEA38C4327 for ; Mon, 13 Nov 2023 14:27:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id B25A4392C297 for ; Mon, 13 Nov 2023 14:27:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B25A4392C297 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B25A4392C297 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885649; cv=none; b=EimOZtNE4vgBQNAZW6NSzEcpB7dPhRWcudY7TkCu90kB+8C0mAtxn/35jsbUwHjhqkcc69VroN6kDX4kIigFtBJFsGDcz1CYmu7tmxiiomuKxlRRAo1hoA19gdvqM8/xfvv7ju1fHsJcJmJ668tEcTk3+FS9eCazWL9Ir8JOvyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885649; c=relaxed/simple; bh=6eqMfh1q//F97xmMprHvrP8HS+GCxPWM9tnU+uoliFE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=HxHIxzxcFg5qsYquHHhKMCSTJizbTtSUwaHw8coA5bUvUur0ddOjBv/oPNInmvUBgPu0otd205bCoSMgdSAfzCHzWO9r6IVWt3fhi5vRAcxFRWESu/hD2Tp5BttQwU5DTLgTvNOKEzGMH8+pYDIanLrkTkdKFjEoKS/rS3X4iF4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 00E5C1007; Mon, 13 Nov 2023 06:28:14 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1280D3F7B4; Mon, 13 Nov 2023 06:27:27 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 07/22] arm: testsuite: tidy up pre-run check for g2.c Date: Mon, 13 Nov 2023 14:26:43 +0000 Message-Id: <20231113142658.69039-8-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 gcc.target/arm/g2.c is an xscale-only test, but the test is quite old and we have improved the infrastructure for setting up such tests now. So make use of that to reduce the number of cases where this test fails to run. gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): Add entry to check for xscale. * gcc.target/arm/g2.c: Use it. --- gcc/testsuite/gcc.target/arm/g2.c | 10 ++++------ gcc/testsuite/lib/target-supports.exp | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/g2.c b/gcc/testsuite/gcc.target/arm/g2.c index ca5e3ccff66..04334c97713 100644 --- a/gcc/testsuite/gcc.target/arm/g2.c +++ b/gcc/testsuite/gcc.target/arm/g2.c @@ -1,11 +1,9 @@ /* Verify that hardware multiply is preferred on XScale. */ /* { dg-do compile } */ -/* { dg-options "-mcpu=xscale -O2 -marm" } */ -/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */ -/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-require-effective-target arm_arch_v5te_arm_ok } */ -/* { dg-require-effective-target arm32 } */ +/* { dg-options "-O2" } */ +/* { dg-require-effective-target arm_arch_xscale_arm_ok } */ +/* { dg-add-options arm_arch_xscale_arm } */ + /* Brett Gaines' test case. */ unsigned BCPL(unsigned) __attribute__ ((naked)); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 7d83bd8740f..9d2958626ad 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5411,6 +5411,7 @@ foreach { armfunc armflag armdefs } { v5te "-march=armv5te+fp -mfloat-abi=softfp" __ARM_ARCH_5TE__ v5te_arm "-march=armv5te+fp -marm" __ARM_ARCH_5TE__ v5te_thumb "-march=armv5te+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__ + xscale_arm "-mcpu=xscale -mfloat-abi=soft -marm" __XSCALE__ v6 "-march=armv6+fp -mfloat-abi=softfp" __ARM_ARCH_6__ v6_arm "-march=armv6+fp -marm" __ARM_ARCH_6__ v6_thumb "-march=armv6+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__ From patchwork Mon Nov 13 14:26:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863226 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=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 4STWyh6Y0bz1yRD for ; Tue, 14 Nov 2023 01:29:11 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F4183399F931 for ; Mon, 13 Nov 2023 14:28:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 6504D392C28E for ; Mon, 13 Nov 2023 14:27:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6504D392C28E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6504D392C28E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885650; cv=none; b=rt4R/P+wNuvU90TZm8ctzVftBmYSFt9odqczVQHCbRAyJQAEl83CyrQTQvRmBpMbCYsmgw+MkMTSQtk83U5h5A+5pIGo9ZLK3I7gHcgVNNFJmJIaYob2w2+25+uUlENIm2TTCv+XUIDH5M5NPACpWjfu75M0zASJ7vjyg3sX4gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885650; c=relaxed/simple; bh=tyHEO2YKVtTcvf5tXLWRv62mXAy0gZ3luiDmRorjzwM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=soif+l4k/P/7gO3hdx2CWrCZgMDy+16MHcMFkUY0zp87gGYKWEt7/UBxG/lk24+2nvddzWffTKPwwIzrUmgxFsAJAJZeXoOtwRYdD+fl18d8L2fswzz6pMSFLM1Xd3LEUWO9RQ49MMK1sDbJyjla24bIQEHkKdosIafNjens2rw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B0C45FEC; Mon, 13 Nov 2023 06:28:14 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C22FA3F7B4; Mon, 13 Nov 2023 06:27:28 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 08/22] arm: testsuite: improve compatibility of arm/lto/pr96939_1.c Date: Mon, 13 Nov 2023 14:26:44 +0000 Message-Id: <20231113142658.69039-9-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This test overrides the architecture, but fails to specify the floating point architecture. This causes problems if -mfpu=auto is used. gcc/testsuite: * gcc.target/arm/lto/pr96939_1.c: Add +simd to the architecture specification. --- gcc/testsuite/gcc.target/arm/lto/pr96939_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/lto/pr96939_1.c b/gcc/testsuite/gcc.target/arm/lto/pr96939_1.c index 53c6093e803..4afdbdaf5ad 100644 --- a/gcc/testsuite/gcc.target/arm/lto/pr96939_1.c +++ b/gcc/testsuite/gcc.target/arm/lto/pr96939_1.c @@ -1,5 +1,5 @@ /* PR target/96939 */ -/* { dg-options "-march=armv8-a+crc" } */ +/* { dg-options "-march=armv8-a+simd+crc" } */ #include From patchwork Mon Nov 13 14:26:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863230 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=8.43.85.97; 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 [8.43.85.97]) (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 4STWzJ6Hc0z1yRD for ; Tue, 14 Nov 2023 01:29:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 023F63A35461 for ; Mon, 13 Nov 2023 14:29:19 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 461C1392C2B8 for ; Mon, 13 Nov 2023 14:27:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 461C1392C2B8 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 461C1392C2B8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885651; cv=none; b=Y3msrWadFe6XEcel5Wb8hpFGVbVNUCelW489nKGbD3WIXxRGJS4u4gkfNgOXzNNX/xsWQKSzkalwKY7Xente2wo7+JDYHPFchwegGiGEXAUKqQjwQz2enWeo/ik3FIuiKyMHjKIte0pp3Qm8nGhpGj5yjE2iOOcVzaxPeJFJdvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885651; c=relaxed/simple; bh=jltwrf0bfLlknjTz+uyd+u8IVogTwA2jgYvEtYOkMhk=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=j4ZHmnMVWWodYz6/DEyBkKLPVTwOOkcGz3rmc78yk3B1NvHtCt1sKgUA1Xh7oEbKHl+3PNjosxI5+tQN1RDBs8p9ieUntZkMi8KsTIMWz4A0snsq330PzEfjC9lpoD6OBuPIVvp+XqTc5KJR4Wf7yiaDHB0r2kFjE0PnK47QMQw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6C431150C; Mon, 13 Nov 2023 06:28:15 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7DE523F7B4; Mon, 13 Nov 2023 06:27:29 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 09/22] arm: testsuite: tidy up pr65647-2.c pre-checks. Date: Mon, 13 Nov 2023 14:26:45 +0000 Message-Id: <20231113142658.69039-10-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Another case where we can make better use of the infrastructure to improve the compatibility of this test. gcc/testsuite: * gcc.target/arm/pr65647-2.c: Use dg-add-options to manage target flags. --- gcc/testsuite/gcc.target/arm/pr65647-2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/pr65647-2.c b/gcc/testsuite/gcc.target/arm/pr65647-2.c index e3978e512ea..79637bfd9d7 100644 --- a/gcc/testsuite/gcc.target/arm/pr65647-2.c +++ b/gcc/testsuite/gcc.target/arm/pr65647-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v6_arm_ok } */ -/* { dg-options "-O3 -marm -march=armv6 -std=c99" } */ +/* { dg-options "-O3 -std=c99" } */ +/* { dg-add-options arm_arch_v6_arm } */ typedef struct { int i; From patchwork Mon Nov 13 14:26:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863219 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=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 4STWxK1WKrz1yRD for ; Tue, 14 Nov 2023 01:28:05 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3861F3AA8CBB for ; Mon, 13 Nov 2023 14:27:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id CFCB23938252 for ; Mon, 13 Nov 2023 14:27:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CFCB23938252 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CFCB23938252 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885651; cv=none; b=LtQ/uhPk/T8x8Scq+9GDfB9zECL7fQihbJQ3Prxf6weok4L1NsB6wl3n6BS0hnUkTUy/mr3KC4aEMlW8W+CNd7EvXX7/21aMxvgJbyxita97Gxy2uMmXrt84wA8sR1gtVSkWbRgZ0LrlYzb2MNF5JqX+sEoUMsaZHYQ4yzryB4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885651; c=relaxed/simple; bh=bsctNbt4suBsr/H9EzGj3sran3yhqmUdT0PpyWg2THs=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=bW5xHl7tTNJI8lrlBp8BKkEkhxPn5t2fsv5ka8lOHrPBSsxcejSqmdhjifEyGTzcvdauwwQ55uZXn4PvPCKcwKUrcNkQN+YjbIViumKsXiQXH3D9vrGShrOUdKpNRqi15uVuW87iLkzuAZpbJK6qw6eSOnWrgqnur8oo4c4L81E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 279F8FEC; Mon, 13 Nov 2023 06:28:16 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3975A3F7B4; Mon, 13 Nov 2023 06:27:30 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 10/22] arm: testsuite: improve compatibility of arm/pr78353-*.c Date: Mon, 13 Nov 2023 14:26:46 +0000 Message-Id: <20231113142658.69039-11-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Again, use the infrastructure available to improve the compatibility of these tests. gcc/testsuite: * gcc.target/arm/pr78353-1.c: Use dg-add-options to manage target flags. * gcc.target/arm/pr78353-2.c: Likewise. --- gcc/testsuite/gcc.target/arm/pr78353-1.c | 3 ++- gcc/testsuite/gcc.target/arm/pr78353-2.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/pr78353-1.c b/gcc/testsuite/gcc.target/arm/pr78353-1.c index a107e300269..56480774ce4 100644 --- a/gcc/testsuite/gcc.target/arm/pr78353-1.c +++ b/gcc/testsuite/gcc.target/arm/pr78353-1.c @@ -1,6 +1,7 @@ /* { dg-do link } */ /* { dg-require-effective-target arm_arch_v7a_multilib } */ -/* { dg-options "-march=armv7-a -mthumb -O2 -flto -Wa,-mimplicit-it=always" } */ +/* { dg-options "-mthumb -O2 -flto -Wa,-mimplicit-it=always" } */ +/* { dg-add-options arm_arch_v7a } */ int main(int x) { diff --git a/gcc/testsuite/gcc.target/arm/pr78353-2.c b/gcc/testsuite/gcc.target/arm/pr78353-2.c index 2589e6135aa..c070d7275bc 100644 --- a/gcc/testsuite/gcc.target/arm/pr78353-2.c +++ b/gcc/testsuite/gcc.target/arm/pr78353-2.c @@ -1,6 +1,7 @@ /* { dg-do link } */ /* { dg-require-effective-target arm_arch_v7a_multilib } */ -/* { dg-options "-march=armv7-a -mthumb -O2 -flto -Wa,-mimplicit-it=always,-mthumb" } */ +/* { dg-options "-mthumb -O2 -flto -Wa,-mimplicit-it=always,-mthumb" } */ +/* { dg-add-options arm_arch_v7a } */ int main(int x) { From patchwork Mon Nov 13 14:26:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863223 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=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 4STWy43B1gz1yRD for ; Tue, 14 Nov 2023 01:28:44 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BFD7138AEBA7 for ; Mon, 13 Nov 2023 14:28:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 94C85393826F for ; Mon, 13 Nov 2023 14:27:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 94C85393826F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 94C85393826F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885652; cv=none; b=sLtUqVx4ydBrVYQzCG8dT7BSeo+de8MaiiRMMsF152sXtBa5alvS4CBKLqH3V7RGfMv4KAfkjEBMzrqpm27Zixc1Hi2Seu6Z3v9QKwD+QBAR7NWLTbFoLFNf/MBq+KSlBGSUygnJQoHqawfDqGtBPvmdQDYwgKSeDWWtoAb+Jyw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885652; c=relaxed/simple; bh=NpzR4xhThSU7tZXh+OD088hlrK/i69Tbatqdnz3MgeI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=MF4hTDHZhEhabM78CHSVC87iKFGfQs8YUHLu1H6a5zcRcP/15AaFKKTunu9kP6EQS+Bpo4xyaYmsBglA9TxE7CqqIW7eokf1J4MiXGzJ0Tt8Mx6X9tATB1W38yWEud73p8u8vTfj3FIybA2jwmVaaVIiPaVY0yOSVhHrVSB5Was= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D78D51007; Mon, 13 Nov 2023 06:28:16 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E94BE3F7B4; Mon, 13 Nov 2023 06:27:30 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 11/22] arm: testsuite: improve compatibility of pr88648-asm-syntax-unified.c Date: Mon, 13 Nov 2023 14:26:47 +0000 Message-Id: <20231113142658.69039-12-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Fix another test that was trying to set the architecture directly rather than using the infrastructure as intended. gcc/testsuite: * gcc.target/arm/pr88648-asm-syntax-unified.c: It isn't necessary to try to override the architecture flags specified by arm_arch_v7a. --- gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c index 251b4d5bc9d..53d0bb053fc 100644 --- a/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c +++ b/gcc/testsuite/gcc.target/arm/pr88648-asm-syntax-unified.c @@ -1,8 +1,8 @@ /* Test for unified syntax assembly generation. */ /* { dg-do compile } */ /* { dg-require-effective-target arm_arch_v7a_ok } */ +/* { dg-options "-marm -masm-syntax-unified" } */ /* { dg-add-options arm_arch_v7a } */ -/* { dg-options "-marm -march=armv7-a -masm-syntax-unified" } */ void test () { From patchwork Mon Nov 13 14:26:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863227 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=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 4STWyk0hcWz1yRm for ; Tue, 14 Nov 2023 01:29:18 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB3003829FBD for ; Mon, 13 Nov 2023 14:28:51 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 5F96C38618BB for ; Mon, 13 Nov 2023 14:27:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F96C38618BB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5F96C38618BB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885653; cv=none; b=XcT8zYrBTyU0zqJWrAlvBvLk77jVOMdUE4aOgtMzfPkXJM30oNlGrFoaxborujbBOnhMpSg1JebOZvDwN7q4VeQwScXOQRjbFe+Twci7Q+cfUFinLmGOghztztKzjyU0lWioj4dU8viR7bqr7q+1jZQMmGw7pvcykqB19ZmCpU0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885653; c=relaxed/simple; bh=NzZXrw/cv3pzqX8CPugwQBanXAzCOFw5Vav3mxT39hk=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=G8tesFGYJuL9TatMyFE8sue75rg0q5t2aLQnD6JQXFTb7icM/aGGQ16ksAQAbsAIhY/HiyjIvmMYRcG++XGPDwlsjo6m8w7UNYi5nBwAMa8I1fGtYIW966PbGuVMf1Q/wVL+MdAsKliRxnhjihNY74ovwWRO7N23w/TpYmdy4V8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 93B3DFEC; Mon, 13 Nov 2023 06:28:17 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A512E3F7B4; Mon, 13 Nov 2023 06:27:31 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 12/22] arm: testsuite: improve compatibility of pragma_arch_attribute*.c Date: Mon, 13 Nov 2023 14:26:48 +0000 Message-Id: <20231113142658.69039-13-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 These tests use pragmas adn attributes to change the architecture. Sometimes they simply add a feature using "+crc", but other times they try to completely reset the architecture using "arch=armv8-a+crc". The latter fails on a hard-float ABI with -mfpu=auto because it also clears the FP capability. Fix by adding +simd when the full architecture is specified. gcc/testsuite: * gcc.target/arm/pragma_arch_attribute.c: Add +simd to pragmas that set an explicit architecture. * gcc.target/arm/pragma_arch_attribute_2.c: Likewise. * gcc.target/arm/pragma_arch_attribute_3.c: Likewise. --- gcc/testsuite/gcc.target/arm/pragma_arch_attribute.c | 6 +++--- gcc/testsuite/gcc.target/arm/pragma_arch_attribute_2.c | 2 +- gcc/testsuite/gcc.target/arm/pragma_arch_attribute_3.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_attribute.c b/gcc/testsuite/gcc.target/arm/pragma_arch_attribute.c index a06dbf04037..a5e1edad3a4 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_arch_attribute.c +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_attribute.c @@ -10,7 +10,7 @@ #endif #pragma GCC push_options -#pragma GCC target ("arch=armv8-a+crc") +#pragma GCC target ("arch=armv8-a+simd+crc") #ifndef __ARM_FEATURE_CRC32 # error "__ARM_FEATURE_CRC32 is not defined in push 1." #endif @@ -41,7 +41,7 @@ void test_crc_unknown_ok_attr_1 () # error "__ARM_FEATURE_CRC32 is defined after attribute set 1." #endif -__attribute__((target("arch=armv8-a+crc"))) +__attribute__((target("arch=armv8-a+simd+crc"))) void test_crc_unknown_ok_attr_2 () { __crc32b (0, 0); @@ -51,4 +51,4 @@ void test_crc_unknown_ok_attr_2 () # error "__ARM_FEATURE_CRC32 is defined after attribute set 2." #endif -#pragma GCC reset_options \ No newline at end of file +#pragma GCC reset_options diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_2.c b/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_2.c index 2e8e385774b..189af170096 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_2.c +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_2.c @@ -8,7 +8,7 @@ extern uint32_t bar(); -__attribute__((target("arch=armv8-a+crc"))) uint32_t crc32cw(uint32_t crc, uint32_t val) +__attribute__((target("arch=armv8-a+simd+crc"))) uint32_t crc32cw(uint32_t crc, uint32_t val) { uint32_t res; asm("crc32cw %0, %1, %2" : "=r"(res) : "r"(crc), "r"(val)); diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_3.c b/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_3.c index 3714812cf26..eb7f990477b 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_3.c +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_attribute_3.c @@ -9,7 +9,7 @@ extern uint32_t bar(); #pragma GCC push_options -#pragma GCC target("arch=armv8-a+crc") +#pragma GCC target("arch=armv8-a+simd+crc") uint32_t crc32cw(uint32_t crc, uint32_t val) { uint32_t res; From patchwork Mon Nov 13 14:26:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863229 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=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 4STWzH0P9Wz1yRD for ; Tue, 14 Nov 2023 01:29:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C5BE9393F652 for ; Mon, 13 Nov 2023 14:29:14 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 58B91393E258 for ; Mon, 13 Nov 2023 14:27:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 58B91393E258 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 58B91393E258 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885654; cv=none; b=qHJInldXYgA4+z5aS8c4gcjeQxZ62mIg7BgT6P3k1XjJG/AY/MUaSnO1mv0Xofp97QAVnHpR4S8V494ZO3oCwUfCfXO3oocNB3fjLPiELJwiXo6jeM38WkpQuaEVx/8HlgcTkX5wLSbvNRCTPLBLyek0JVmJxYkiERDyRN8ffqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885654; c=relaxed/simple; bh=Tr6uSt5PCwszLXQrS9x3UkiEDEqShrIKVCvn8sAtYqU=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=j+iQDUEmodBcNbNwEdZNiiytqk67rXdX/2Iy+wqBKFGJirbU28jHSVjZkJZqsd2t+mmepM2sFvbUPVf5otXbvR2zdSVY28CQxMH8wUk+y3X9T71UVrtGfcFD4Yaa5rrGKsND0WoDpOm3H8jIRkfwxtQA3mMHKNd0jYucb3cIdDo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4EF411007; Mon, 13 Nov 2023 06:28:18 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 60D683F7B4; Mon, 13 Nov 2023 06:27:32 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 13/22] arm: testsuite: improve compatibility of pragma_arch_switch_2.c Date: Mon, 13 Nov 2023 14:26:49 +0000 Message-Id: <20231113142658.69039-14-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This test was explicitly setting the architecture on the command-line and in the body of the test. In both cases this causes problems with the auto FPU setting. Fix by using the testsuite infrastructure correctly and by adding +fp to the pragma. gcc/testsuite: * gcc.target/arm/pragma_arch_switch_2.c: Use testsuite infrastructure to set the architecture flags. Add +fp to the pragma that changes the architecture. --- gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c index 5080d2c7a91..567943bd8ed 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c @@ -3,9 +3,10 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_arm_ok } */ /* { dg-require-effective-target arm_arch_v5te_arm_ok } */ -/* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99 -marm" } */ +/* { dg-additional-options "-Wall -O2 -std=gnu99" } */ +/* { dg-add-options arm_arch_v5te_arm } */ -#pragma GCC target ("arch=armv6") +#pragma GCC target ("arch=armv6+fp") int test_assembly (int hi, int lo) { int res; From patchwork Mon Nov 13 14:26:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863228 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=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 4STWyw3jMcz1yRD for ; Tue, 14 Nov 2023 01:29:28 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6699E391AB6C for ; Mon, 13 Nov 2023 14:28:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id C59AD393824A for ; Mon, 13 Nov 2023 14:27:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C59AD393824A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C59AD393824A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885654; cv=none; b=Ips2+vkoOx6gFWfvbKRp1kiB8U15tEEI+PTR5/xfOzs+uvVnerDueRpzqBBi/GU4XGshl+tetlWOSud8pXWyFZ9xNHf3CHRFbYPTJxU82OjsMhZ72TFC3vdomCLezRpflH+vQAHRZ3sovxFw1wO7aPlIRTQjeoYRwXM/a5UinIU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885654; c=relaxed/simple; bh=x6Bq+j3tomf7iy0/EQJ+6NmGihloBK9fuIkcS/g8fyc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=YVh6y7F6PQAO2rjIiAgPDUo+GM1NviZi7YtdGusgFXaKH+rISLmc2FxqQxO9U2OF8YHcV1nPGtT8cNx0RfcQTlnh1RtrZmSOTNIyu154EicqXSPzQmodsT+3hWeI5B5ustT8phmgn7Emd7YNR57AfmPLmPLEf5Gy4p5fv5s6uC8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0A96A150C; Mon, 13 Nov 2023 06:28:19 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1C5A93F7B4; Mon, 13 Nov 2023 06:27:32 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 14/22] arm: testsuite: modernize framework usage for arm/scd42-2.c Date: Mon, 13 Nov 2023 14:26:50 +0000 Message-Id: <20231113142658.69039-15-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Make this test more useful by using dg-require-effective-target/ dg-add-options. gcc/testsuite: * gcc.target/arm/scd42-2.c: Use modern dg- flags. --- gcc/testsuite/gcc.target/arm/scd42-2.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c b/gcc/testsuite/gcc.target/arm/scd42-2.c index 3c9768d22d9..cd416885a80 100644 --- a/gcc/testsuite/gcc.target/arm/scd42-2.c +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c @@ -1,11 +1,8 @@ /* Verify that mov is preferred on XScale for loading a 2 byte constant. */ /* { dg-do compile } */ -/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */ -/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-require-effective-target arm32 } */ -/* { dg-require-effective-target arm_arch_v5te_arm_ok } */ -/* { dg-options "-mcpu=xscale -O -marm" } */ +/* { dg-require-effective-target arm_arch_xscale_arm_ok } */ +/* { dg-options "-O" } */ +/* { dg-add-options arm_arch_xscale_arm } */ unsigned load2(void) __attribute__ ((naked)); unsigned load2(void) From patchwork Mon Nov 13 14:26:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863234 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=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 4STX0B1Nmfz1yR8 for ; Tue, 14 Nov 2023 01:30:34 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7652E38CB05F for ; Mon, 13 Nov 2023 14:29:45 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 77D4438B67BC for ; Mon, 13 Nov 2023 14:27:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 77D4438B67BC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 77D4438B67BC Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885655; cv=none; b=H7CVkdEbK1IwGyDx5hxqT5RbHgabNuGnJLTNnEVNIg/QZw0OAaUrgl1KzXAA7g7DO5y7jwz8mif0SGEj/kNCjKejVj35gtMieJpRw0c3b7WbeLilj6ceRRrfQ2ktmRttCxQRLYgm5mxIACEtxti4YCzVpIYwdSAC+cj5y1ZC10c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885655; c=relaxed/simple; bh=vr51LEBcZqGYsqtY3Wadot7+zhtxRhZ5+HEzfx/HDg0=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=p7UfyvnjAfaLZTEOOT8zXhzBgnUl7lXE+FfShKkaWL8dsVVThREHjrGP7E4LcEvitggRYipChCTL7rq+8YqpEuib4tUv13cjFtxtNZYKJrmAVE37aoOJKN24BEW4CUP1jHnjKu1Knhj6xY4tygx9LsizzNrNbzsxR9UEb61/NDc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BA7DAFEC; Mon, 13 Nov 2023 06:28:19 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CC4C73F7B4; Mon, 13 Nov 2023 06:27:33 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 15/22] arm: testsuite: improve compatibility of ftest-armv7m-thumb.c Date: Mon, 13 Nov 2023 14:26:51 +0000 Message-Id: <20231113142658.69039-16-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This test is specific to armv7m cores which do not support hardware floating-point. We can improve its compatibility by having the default options for this core specify -mfloat-abi=soft. gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): Use soft-float ABI for armv7m. * gcc.target/arm/ftest-armv7m-thumb.c: Use dg-require-effective-target to check flag compatibility. --- gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c | 3 +-- gcc/testsuite/lib/target-supports.exp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c index 363b48b7516..ba1985f5b0d 100644 --- a/gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c +++ b/gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c @@ -1,6 +1,5 @@ /* { dg-do compile } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=arm7-m" } } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ +/* { dg-require-effective-target arm_arch_v7m_ok } /* { dg-options "-mthumb" } */ /* { dg-add-options arm_arch_v7m } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 9d2958626ad..316e34a34be 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5425,7 +5425,7 @@ foreach { armfunc armflag armdefs } { v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__ v7a "-march=armv7-a+fp" __ARM_ARCH_7A__ v7r "-march=armv7-r+fp" __ARM_ARCH_7R__ - v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__ + v7m "-march=armv7-m -mthumb -mfloat-abi=soft" __ARM_ARCH_7M__ v7em "-march=armv7e-m+fp -mthumb" __ARM_ARCH_7EM__ v7ve "-march=armv7ve+fp -marm" "__ARM_ARCH_7A__ && __ARM_FEATURE_IDIV" From patchwork Mon Nov 13 14:26:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863233 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=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 4STWzk04Vyz1yR8 for ; Tue, 14 Nov 2023 01:30:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2E0B3AA48AC for ; Mon, 13 Nov 2023 14:29:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 2AE9E393E26D for ; Mon, 13 Nov 2023 14:27:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AE9E393E26D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2AE9E393E26D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885656; cv=none; b=hMVQv+aXgCGB3ixoBcB4/7ZKNXEZlpdcjiBxkAiCiYHJySPWWrfD0dOvLjSSwSV2UCKAfZOIxjYk/6f7mNP9K2N84IQPXUSues4+HgGlrq3jJ7yZByoifvHkM+3N8HN4ceHXxRMSVwdxW+KAE6olM8woClkatoaBj6tXhfBk43g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885656; c=relaxed/simple; bh=FMVfsPe8yCt/krQi1LygiupTQl/oCwgSImdgvwKrCXg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=Eq4cOfodANy9AEUH9ce20xRFPAaCf0zKSMU1l2B6socL5BnkLF7CZtdzp57QkxO+VhyQnBfiQV2VnWgJ/tyVHMLbmBiShlyJ//uIvLHmlMMi0AJlCSgt43md9qcJSSMoJbrwbwaGas5Ceq036DORMldOqjJ87JD+gOaLil6iDx0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 767631007; Mon, 13 Nov 2023 06:28:20 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 87E433F7B4; Mon, 13 Nov 2023 06:27:34 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 16/22] arm: testsuite: improve compatibility of gcc.target/arm/macro_defs*.c Date: Mon, 13 Nov 2023 14:26:52 +0000 Message-Id: <20231113142658.69039-17-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Convert these tests to use dg-add-options for increased compatibilty. Since they also result in an empty translation unit, override the default testsuite options. gcc/testsuite: * gcc.target/arm/macro_defs0.c: Use dg-effective-target and dg-add-options. * gcc.target/arm/macro_defs1.c: Likewise. * gcc.target/arm/macro_defs2.c: Likewise. --- gcc/testsuite/gcc.target/arm/macro_defs0.c | 7 +++---- gcc/testsuite/gcc.target/arm/macro_defs1.c | 6 ++---- gcc/testsuite/gcc.target/arm/macro_defs2.c | 6 ++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/macro_defs0.c b/gcc/testsuite/gcc.target/arm/macro_defs0.c index 684d49ffafa..17fd157452e 100644 --- a/gcc/testsuite/gcc.target/arm/macro_defs0.c +++ b/gcc/testsuite/gcc.target/arm/macro_defs0.c @@ -1,8 +1,7 @@ /* { dg-do compile } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-m" } } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ -/* { dg-options "-march=armv7-m -mcpu=cortex-m3 -mfloat-abi=soft -mthumb" } */ +/* { dg-require-effective-target arm_arch_v7m_ok } */ +/* { dg-options "" } */ +/* { dg-add-options arm_arch_v7m } */ #ifdef __ARM_FP #error __ARM_FP should not be defined diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c b/gcc/testsuite/gcc.target/arm/macro_defs1.c index 655ba9334f3..bd22154321e 100644 --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c @@ -1,10 +1,8 @@ /* { dg-do compile } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ /* { dg-require-effective-target arm_arch_v6m_ok } */ -/* { dg-options "-march=armv6-m -mthumb" } */ +/* { dg-options "" } */ +/* { dg-add-options arm_arch_v6m } */ #ifdef __ARM_NEON_FP #error __ARM_NEON_FP should not be defined #endif - diff --git a/gcc/testsuite/gcc.target/arm/macro_defs2.c b/gcc/testsuite/gcc.target/arm/macro_defs2.c index 9a960423562..a26fc237611 100644 --- a/gcc/testsuite/gcc.target/arm/macro_defs2.c +++ b/gcc/testsuite/gcc.target/arm/macro_defs2.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-march=armv7ve -mcpu=cortex-a15 -mfpu=neon-vfpv4" } */ -/* { dg-add-options arm_neon } */ /* { dg-require-effective-target arm_neon_ok } */ +/* { dg-options "" } */ +/* { dg-add-options arm_neon } */ #ifndef __ARM_NEON_FP #error __ARM_NEON_FP is not defined but should be @@ -10,5 +10,3 @@ #ifndef __ARM_FP #error __ARM_FP is not defined but should be #endif - - From patchwork Mon Nov 13 14:26:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863224 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=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 4STWyR4WKnz1yRD for ; Tue, 14 Nov 2023 01:29:03 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BC193383F1A7 for ; Mon, 13 Nov 2023 14:28:42 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id DA6F63945C12 for ; Mon, 13 Nov 2023 14:27:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DA6F63945C12 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DA6F63945C12 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885656; cv=none; b=UtzeSIMZoWDuHvmOot6RD9VI6XQbBRdRZpvUjyWuGZ1p79D3saKyt/SbUFVtwkOL9XjUUaCvlIippxTX9CAOSI/xcUwhWIR4W3+lyBtH6qEdtY7bx0vY/36/0lznnhyQyuGSmWoouR25HRAZ4KJmb+yLx0M9UF+p7D9rXO7GAQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885656; c=relaxed/simple; bh=Nh65D5goWawQs2g+pdTBQiNDYKShAfJdcvXn49/Dow4=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=GVqcx5rmwOTAWo3BYeSEXWU0PHlYH37mtQ93yXGodaxFTiqv+ANp3ZAnO2NEFukHgqCo3w2cSsNBSXuJcOfp9Bc5g5JbQqSN6Fb6I0wLWUzZBIVmj/gTmRUlvptcGB0lL1QyjMIK/8+dMpDKcmFlx4csBW/5VLFh4KA5eIDA3pE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 32088FEC; Mon, 13 Nov 2023 06:28:21 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4414E3F7B4; Mon, 13 Nov 2023 06:27:35 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 17/22] arm: testsuite: improve compatibility of gcc.target/arm/optional_thumb-*.c Date: Mon, 13 Nov 2023 14:26:53 +0000 Message-Id: <20231113142658.69039-18-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 These tests deliberately pass invalid option combinations to check that the compiler is generating the correct diagnostic. Nevertheless, we can improve their compatibility with other testsuite options. For optional_thumb-1.c we use a soft-float ABI, while for optional_thumb2.c we use arm_arch_v7em as the target architecture, then set the architecture manually. gcc/testsuite: * gcc.target/arm/optional_thumb-1.c: Force a soft-float ABI. * gcc.target/arm/optional_thumb-3.c: Check for armv7e-m compatibility, then set the architecture explicitly. --- gcc/testsuite/gcc.target/arm/optional_thumb-1.c | 2 +- gcc/testsuite/gcc.target/arm/optional_thumb-3.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c index 99cb0c3f33b..90d9ada6ade 100644 --- a/gcc/testsuite/gcc.target/arm/optional_thumb-1.c +++ b/gcc/testsuite/gcc.target/arm/optional_thumb-1.c @@ -1,6 +1,6 @@ /* { dg-do compile { target { ! default_mode } } } */ /* { dg-skip-if "-marm/-mthumb/-march/-mcpu given" { *-*-* } { "-marm" "-mthumb" "-march=*" "-mcpu=*" } } */ -/* { dg-options "-march=armv6-m" } */ +/* { dg-options "-march=armv6-m -mfloat-abi=soft" } */ /* Check that -mthumb is not needed when compiling for a Thumb-only target. */ diff --git a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c index d9150e09e47..a6c661ac031 100644 --- a/gcc/testsuite/gcc.target/arm/optional_thumb-3.c +++ b/gcc/testsuite/gcc.target/arm/optional_thumb-3.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_cortex_m } */ +/* { dg-require-effective-target arm_arch_v7em_ok } */ /* { dg-skip-if "-mthumb given" { *-*-* } { "-mthumb" } } */ -/* { dg-options "-marm" } */ +/* { dg-options "-march=armv7e-m+fp -marm" } */ /* { dg-error "target CPU does not support ARM mode" "missing error with -marm on Thumb-only targets" { target *-*-* } 0 } */ /* Check that -marm gives an error when compiling for a Thumb-only target. */ From patchwork Mon Nov 13 14:26:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863235 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=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 4STX0S1bVBz1yR8 for ; Tue, 14 Nov 2023 01:30:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 712BA388FDB6 for ; Mon, 13 Nov 2023 14:29:59 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 97802393824E for ; Mon, 13 Nov 2023 14:27:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 97802393824E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 97802393824E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885657; cv=none; b=qi7M6E33xUnA8ST6YAA8OwOxveRWoy8jj48UVOGYpM9WfLZbuVIVLQNxehPmJX3QcvQgff0yI8G4wu28LuLoObad/kZWjC18rvU04rug3++A76qVW1G56D4X0mBilEa9SVtVOqE+MveMNSGUNsapV2yIHUMKE7Zg1w3Ekfdj97k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885657; c=relaxed/simple; bh=Pkh+3kDvP8OpQq9ETz500DTM/cKAbyHIMvY0rBxb99s=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=NPoeEzSmQxvik+wGUtT6NaGNA0ABqcn+dRneZk+HlK1cfPdzODHGxzhcXLbpnwKOPda/KGuwfXi+a5x8pZCSTbS0Ra1PoHoZWlZr3pUxMuww7muuVNlGY4GubVJ/X7/44fY7dt45gif5f44y5aHpszrCqq7glmnVs0dzISOdlr4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E2DD1152B; Mon, 13 Nov 2023 06:28:21 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F3B373F7B4; Mon, 13 Nov 2023 06:27:35 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 18/22] arm: testsuite: improve compatibility of gcc.target/arm/pr19599.c Date: Mon, 13 Nov 2023 14:26:54 +0000 Message-Id: <20231113142658.69039-19-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Add +fp to the architecture specification, so that -mfpu=auto works with the hard-float ABI. gcc/testsuite: * gcc.target/arm/pr19599.c: Add +fp to the architecture. --- gcc/testsuite/gcc.target/arm/pr19599.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/pr19599.c b/gcc/testsuite/gcc.target/arm/pr19599.c index a536548442f..d2f15ae4499 100644 --- a/gcc/testsuite/gcc.target/arm/pr19599.c +++ b/gcc/testsuite/gcc.target/arm/pr19599.c @@ -1,6 +1,6 @@ /* { dg-skip-if "need at least armv5te" { *-*-* } { "-march=armv[234]*" "-mthumb" } { "" } } */ /* { dg-skip-if "FDPIC does not support armv5te" { arm*-*-uclinuxfdpiceabi } "*" "" } */ -/* { dg-options "-O2 -march=armv5te -marm" } */ +/* { dg-options "-O2 -march=armv5te+fp -marm" } */ /* { dg-final { scan-assembler "bx" } } */ int (*indirect_func)(); From patchwork Mon Nov 13 14:26:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863231 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=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 4STWzP50Y8z1yRD for ; Tue, 14 Nov 2023 01:29:53 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AA3B8384DB52 for ; Mon, 13 Nov 2023 14:29:18 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 675A13948A5E for ; Mon, 13 Nov 2023 14:27:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 675A13948A5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 675A13948A5E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885658; cv=none; b=oxzWE9kVU/ekHCaj5HWX2kcYm4TltXEB/oj4sPH/PfOnaxUZ/XGTSZovhfDhkcLq/yJa15p/YMfJywkg/VuquOWRk/8nT3Fc7U4KB2KaDwZqiH4yfj3fYgienwVj3/3j9Pw88EXQc3J1n5ODDlQ/hPpUILs4ZUjXTf0O7qo/x4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885658; c=relaxed/simple; bh=lgppKgULent6gEjhKCw4xdMELHzMoh4JHIIUBzFhm4A=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=vRX3jLiSvMYAAM4CGRZzb6Hyl5PFTk0friooCHRgOPixwN2UDs34ODkdGcTbQuAf1yIxbyMqjezaL6KT2SwcS5pFvCJQyuTqF2RBR1svNZf5CsxrCOIrjggWogRY7i5Xr9bqOBWePXbbMvG09V80Z2I2UXnyKrsRFuHw4mY7H7Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A1690FEC; Mon, 13 Nov 2023 06:28:22 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B00873F7B4; Mon, 13 Nov 2023 06:27:36 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 19/22] arm: testsuite: improve compatibility of gcc.target/arm/pr59575.c Date: Mon, 13 Nov 2023 14:26:55 +0000 Message-Id: <20231113142658.69039-20-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Use dg-require-effective-target/dg-add-options to improve compatibility of this test with various compiler configurations. gcc/testsuite: * gcc.target/arm/pr59575.c: Use dg-require-effective-target and dg-add-options. --- gcc/testsuite/gcc.target/arm/pr59575.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/arm/pr59575.c b/gcc/testsuite/gcc.target/arm/pr59575.c index cc49be3d61f..27d7d40526e 100644 --- a/gcc/testsuite/gcc.target/arm/pr59575.c +++ b/gcc/testsuite/gcc.target/arm/pr59575.c @@ -1,7 +1,9 @@ /* PR target/59575 */ /* { dg-do compile } */ +/* { dg-require-effective-target arm_arch_v7a_ok } */ /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ -/* { dg-options "-Os -g -march=armv7-a" } */ +/* { dg-options "-Os -g" } */ +/* { dg-add-options arm_arch_v7a } */ void foo (int *); int *bar (int, long long, int); From patchwork Mon Nov 13 14:26:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863232 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=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 4STWzS0QYJz1yRD for ; Tue, 14 Nov 2023 01:29:56 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E3242383624E for ; Mon, 13 Nov 2023 14:29:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 4DB673947429 for ; Mon, 13 Nov 2023 14:27:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DB673947429 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4DB673947429 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885659; cv=none; b=EqgeJjkDA6bjkBTeyOgs03mQHJ8isAkWWLmR6sE2IRWEhnIs4nqpVxVDibdrKsgn13VjjOxv8cxdno6b8haACkWxwOmq2xq/TifJ9KZwDtpEG3t1BjLsp59gknvLZCBhoJw/slErIw7B4kVbrDon6mT0Lu2KsBXRxhx/LC7qZCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885659; c=relaxed/simple; bh=u+ifsj0dIKvodHjXhUZ8DlpDi005Tu59zi41QIA4dKk=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=i3JLHrqvV9UhnQ6t4BBB3LB0Pqpmt5cdPAPUh2C1In0jmthFQA356Dk/7mGQSu++yIItgMPxz7q1eCqMqcpxjM720Bc83cR/LE8tBRFLLeUxVehQhO391RP69KGI7nUSrL2cx6gN+YUj0xFuPVePfoQMzzA6GKpgJFYUJQXOSbU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 906871007; Mon, 13 Nov 2023 06:28:23 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 75CE43F7B4; Mon, 13 Nov 2023 06:27:37 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 20/22] testsuite: arm: tighten up mode-specific ISA tests Date: Mon, 13 Nov 2023 14:26:56 +0000 Message-Id: <20231113142658.69039-21-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 Some of the standard Arm architecture tests require the test to use a specific instruction set (arm or thumb). But although the framework was checking that the flag was accepted, it wasn't checking that the flag wasn't somehow being override (eg by run-specific options). We can improve these tests easily by checking whether or not __thumb-_ is defined. gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): For instruction-set specific tests, check that __thumb__ is, or isn't defined as appropriate. --- gcc/testsuite/lib/target-supports.exp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 316e34a34be..3d504d26164 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5403,25 +5403,25 @@ proc check_effective_target_arm_fp16_hw { } { foreach { armfunc armflag armdefs } { v4 "-march=armv4 -marm" __ARM_ARCH_4__ v4t "-march=armv4t -mfloat-abi=softfp" __ARM_ARCH_4T__ - v4t_arm "-march=armv4t -marm" __ARM_ARCH_4T__ - v4t_thumb "-march=armv4t -mthumb -mfloat-abi=softfp" __ARM_ARCH_4T__ + v4t_arm "-march=armv4t -marm" "__ARM_ARCH_4T__ && !__thumb__" + v4t_thumb "-march=armv4t -mthumb -mfloat-abi=softfp" "__ARM_ARCH_4T__ && __thumb__" v5t "-march=armv5t -mfloat-abi=softfp" __ARM_ARCH_5T__ - v5t_arm "-march=armv5t -marm" __ARM_ARCH_5T__ - v5t_thumb "-march=armv5t -mthumb -mfloat-abi=softfp" __ARM_ARCH_5T__ + v5t_arm "-march=armv5t -marm" "__ARM_ARCH_5T__ && !__thumb__" + v5t_thumb "-march=armv5t -mthumb -mfloat-abi=softfp" "__ARM_ARCH_5T__ && __thumb__" v5te "-march=armv5te+fp -mfloat-abi=softfp" __ARM_ARCH_5TE__ - v5te_arm "-march=armv5te+fp -marm" __ARM_ARCH_5TE__ - v5te_thumb "-march=armv5te+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_5TE__ - xscale_arm "-mcpu=xscale -mfloat-abi=soft -marm" __XSCALE__ + v5te_arm "-march=armv5te+fp -marm" "__ARM_ARCH_5TE__ && !__thumb__" + v5te_thumb "-march=armv5te+fp -mthumb -mfloat-abi=softfp" "__ARM_ARCH_5TE__ && __thumb__" + xscale_arm "-mcpu=xscale -mfloat-abi=soft -marm" "__XSCALE__ && !__thumb__" v6 "-march=armv6+fp -mfloat-abi=softfp" __ARM_ARCH_6__ - v6_arm "-march=armv6+fp -marm" __ARM_ARCH_6__ - v6_thumb "-march=armv6+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6__ + v6_arm "-march=armv6+fp -marm" "__ARM_ARCH_6__ && !__thumb__" + v6_thumb "-march=armv6+fp -mthumb -mfloat-abi=softfp" "__ARM_ARCH_6__ && __thumb__" v6k "-march=armv6k+fp -mfloat-abi=softfp" __ARM_ARCH_6K__ - v6k_arm "-march=armv6k+fp -marm" __ARM_ARCH_6K__ - v6k_thumb "-march=armv6k+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6K__ + v6k_arm "-march=armv6k+fp -marm" "__ARM_ARCH_6K__ && !__thumb__" + v6k_thumb "-march=armv6k+fp -mthumb -mfloat-abi=softfp" "__ARM_ARCH_6K__ && __thumb__" v6t2 "-march=armv6t2+fp" __ARM_ARCH_6T2__ v6z "-march=armv6z+fp -mfloat-abi=softfp" __ARM_ARCH_6Z__ - v6z_arm "-march=armv6z+fp -marm" __ARM_ARCH_6Z__ - v6z_thumb "-march=armv6z+fp -mthumb -mfloat-abi=softfp" __ARM_ARCH_6Z__ + v6z_arm "-march=armv6z+fp -marm" "__ARM_ARCH_6Z__ && !__thumb__" + v6z_thumb "-march=armv6z+fp -mthumb -mfloat-abi=softfp" "__ARM_ARCH_6Z__ && __thumb__" v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__ v7a "-march=armv7-a+fp" __ARM_ARCH_7A__ v7r "-march=armv7-r+fp" __ARM_ARCH_7R__ From patchwork Mon Nov 13 14:26:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863237 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=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 4STX0t3yL7z1yR8 for ; Tue, 14 Nov 2023 01:31:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1EFD43919B54 for ; Mon, 13 Nov 2023 14:30:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 7EFFA393827B for ; Mon, 13 Nov 2023 14:27:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7EFFA393827B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7EFFA393827B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885661; cv=none; b=cXZ9jYuwDpJrQBWD+2XqtFerx0XQRu8YsgmShB9VETUzTwpawXxd71JDffP6YpvJCuDdNZuPR4Xv60HyWoPmFN1TfUlQDswWvjbha+w5wo/LGExVzrtseraCei0lIi49lPS/8HRte5V7hx5epbGKe20Og6ZgYlV6f3+ulwMVBXQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885661; c=relaxed/simple; bh=AyGypS9Z7jsV/3WxgkGfl6wFYqOiPFvnZuRD5RSVJmI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=bLJR2XneMwKIbh174Mbj21HxoM1LejRBBOTST69R8dD82TzoQ9gS/DgMqkmg54uwJ4jt1+lzumBCkbgC4lJPh1RH8grOcOGxRuh+OQovAwfGTnuR2EJJasAqGRe/vOjxhFFD4ibHisltH1EI+jzAPlPGehPu6prDgxeYVkl0igg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CA29BFEC; Mon, 13 Nov 2023 06:28:24 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 863FF3F7B4; Mon, 13 Nov 2023 06:27:38 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 21/22] arm: testsuite: fix some more architecture tests Date: Mon, 13 Nov 2023 14:26:57 +0000 Message-Id: <20231113142658.69039-22-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This fixes a bunch more tests that try to override the default architecture; some partially used the framework for doing this, others just blindly added a -march option, which was doomed to cause problems. In most cases we can now run these tests regardless of the users testing options and the base compiler configuration. gcc/testsuite: * lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok): Add test for v7a_arm. * gcc.target/arm/pr60650-2.c: Use require-effective-target and add-options. * gcc.target/arm/pr60657.c: Likewise. * gcc.target/arm/pr60663.c: Likewise. * gcc.target/arm/pr81863.c: Likewise. * gcc.target/arm/pr97969.c: Likewise. * gcc.target/arm/pr98931.c: Likewise. * gcc.target/arm/tail-long-call.c: Likewise. --- gcc/testsuite/gcc.target/arm/pr60650-2.c | 4 +++- gcc/testsuite/gcc.target/arm/pr60657.c | 4 +++- gcc/testsuite/gcc.target/arm/pr60663.c | 4 +++- gcc/testsuite/gcc.target/arm/pr81863.c | 4 +++- gcc/testsuite/gcc.target/arm/pr97969.c | 4 +++- gcc/testsuite/gcc.target/arm/pr98931.c | 5 +++-- gcc/testsuite/gcc.target/arm/tail-long-call.c | 6 ++++-- gcc/testsuite/lib/target-supports.exp | 1 + 8 files changed, 23 insertions(+), 9 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/pr60650-2.c b/gcc/testsuite/gcc.target/arm/pr60650-2.c index c44d7b5f9d2..36d57f08676 100644 --- a/gcc/testsuite/gcc.target/arm/pr60650-2.c +++ b/gcc/testsuite/gcc.target/arm/pr60650-2.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ +/* { dg-require-effective-target arm_arch_v7a_ok } */ /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ -/* { dg-options "-O2 -fno-omit-frame-pointer -march=armv7-a" } */ +/* { dg-options "-O2 -fno-omit-frame-pointer" } */ +/* { dg-add-options arm_arch_v7a } */ int a, h, j; long long d, e, i; diff --git a/gcc/testsuite/gcc.target/arm/pr60657.c b/gcc/testsuite/gcc.target/arm/pr60657.c index ca121526bb3..e608dd39355 100644 --- a/gcc/testsuite/gcc.target/arm/pr60657.c +++ b/gcc/testsuite/gcc.target/arm/pr60657.c @@ -1,6 +1,8 @@ /* { dg-do compile } */ +/* { dg-require-effective-target arm_arch_v7a_ok } */ /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_arch_v7a } */ void foo (void); diff --git a/gcc/testsuite/gcc.target/arm/pr60663.c b/gcc/testsuite/gcc.target/arm/pr60663.c index 8d76d79301a..bb48d7fdae8 100644 --- a/gcc/testsuite/gcc.target/arm/pr60663.c +++ b/gcc/testsuite/gcc.target/arm/pr60663.c @@ -1,7 +1,9 @@ /* PR rtl-optimization/60663 */ /* { dg-do compile } */ +/* { dg-require-effective-target arm_arch_v7a_ok } */ /* { dg-skip-if "-mpure-code supports M-profile only" { *-*-* } { "-mpure-code" } } */ -/* { dg-options "-O2 -march=armv7-a" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_arch_v7a } */ int foo (void) diff --git a/gcc/testsuite/gcc.target/arm/pr81863.c b/gcc/testsuite/gcc.target/arm/pr81863.c index 85bfab144c0..a96f3b58411 100644 --- a/gcc/testsuite/gcc.target/arm/pr81863.c +++ b/gcc/testsuite/gcc.target/arm/pr81863.c @@ -1,8 +1,10 @@ /* testsuite/gcc.target/arm/pr48183.c */ /* { dg-do compile } */ +/* { dg-require-effective-target arm_arch_v7a_arm_ok } */ /* { dg-skip-if "-mslow-flash-data and -mword-relocations incompatible" { *-*-* } { "-mslow-flash-data" } } */ /* { dg-skip-if "-mpure-code and -mword-relocations incompatible" { *-*-* } { "-mpure-code" } } */ -/* { dg-options "-O2 -mword-relocations -march=armv7-a -marm" } */ +/* { dg-options "-O2 -mword-relocations" } */ +/* { dg-add-options arm_arch_v7a_arm } */ /* { dg-final { scan-assembler-not "\[\\t \]+movw" } } */ int a, d, f; diff --git a/gcc/testsuite/gcc.target/arm/pr97969.c b/gcc/testsuite/gcc.target/arm/pr97969.c index 714a1d18870..b8c3a23676a 100644 --- a/gcc/testsuite/gcc.target/arm/pr97969.c +++ b/gcc/testsuite/gcc.target/arm/pr97969.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-std=c99 -fno-omit-frame-pointer -mthumb -w -Os" } */ +/* { dg-require-effective-target arm_arch_v6m_ok } */ +/* { dg-options "-std=c99 -fno-omit-frame-pointer -w -Os" } */ +/* { dg-add-options arm_arch_v6m } */ typedef a[23]; enum { b }; diff --git a/gcc/testsuite/gcc.target/arm/pr98931.c b/gcc/testsuite/gcc.target/arm/pr98931.c index 66070ad7298..56f66a3b82f 100644 --- a/gcc/testsuite/gcc.target/arm/pr98931.c +++ b/gcc/testsuite/gcc.target/arm/pr98931.c @@ -1,6 +1,7 @@ /* { dg-do assemble } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" "-mcpu=*" } } */ -/* { dg-options "-march=armv8.1-m.main -O3 --param=max-completely-peeled-insns=1300 --save-temps -mthumb" } */ +/* { dg-require-effective-target arm_arch_v8_1m_main_ok } */ +/* { dg-options "-O3 --param=max-completely-peeled-insns=1300 --save-temps" } */ +/* { dg-add-options arm_arch_v8_1m_main } */ extern long long a[][20][26][26][22]; diff --git a/gcc/testsuite/gcc.target/arm/tail-long-call.c b/gcc/testsuite/gcc.target/arm/tail-long-call.c index f70e9cf3938..6a130063fcc 100644 --- a/gcc/testsuite/gcc.target/arm/tail-long-call.c +++ b/gcc/testsuite/gcc.target/arm/tail-long-call.c @@ -1,6 +1,8 @@ -/* { dg-skip-if "need at least armv5te" { *-*-* } { "-march=armv[234]*" "-mthumb" } { "" } } */ +/* { dg-do compile } */ +/* { dg-require-effective-target arm_arch_v5te_arm_ok } */ /* { dg-skip-if "FDPIC does not support tailcall optimization" { arm*-*-uclinuxfdpiceabi } "*" "" } */ -/* { dg-options "-O2 -march=armv5te -marm" } */ +/* { dg-options "-O2" } */ +/* { dg-add-options arm_arch_v5te_arm } */ /* { dg-final { scan-assembler "bx" } } */ /* { dg-final { scan-assembler-not "blx" } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 3d504d26164..ae43dc97872 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5424,6 +5424,7 @@ foreach { armfunc armflag armdefs } { v6z_thumb "-march=armv6z+fp -mthumb -mfloat-abi=softfp" "__ARM_ARCH_6Z__ && __thumb__" v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__ v7a "-march=armv7-a+fp" __ARM_ARCH_7A__ + v7a_arm "-march=armv7-a+fp -marm" "__ARM_ARCH_7A__ && !__thumb__" v7r "-march=armv7-r+fp" __ARM_ARCH_7R__ v7m "-march=armv7-m -mthumb -mfloat-abi=soft" __ARM_ARCH_7M__ v7em "-march=armv7e-m+fp -mthumb" __ARM_ARCH_7EM__ From patchwork Mon Nov 13 14:26:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 1863236 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=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 4STX0W349Sz1yR8 for ; Tue, 14 Nov 2023 01:30:51 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CD9D73872CDB for ; Mon, 13 Nov 2023 14:30:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id AD6413948A58 for ; Mon, 13 Nov 2023 14:27:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD6413948A58 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AD6413948A58 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885661; cv=none; b=cOnS2Vhe27dS9xvygFc72mDDBlL/p7hJzVrKnpPSh6DHjxsDACzxglr+RN5r6GMKM6B4TGwT4WFFvW3Tx3GobO1I1F98CuA+oV6nOrEe/UPjsyR4D+y2SNLpEv3k5TVy/PqebdCv3p30lrgkyELwHO0jQkcT1jjzNq1RvrF4QZg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885661; c=relaxed/simple; bh=hFEHZk3eK6JaQi89WC5Y3/OdLWxqs5CyStlnE+MbDvM=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=szma7cFkB3Plbimngq52Klln9OBTiCvR7Oy99COVGbl4sEmNdDrLhXCwDlxZgyQGcgvMEk/Hgh2I6Ion8z/Q25Cor9CIjza5YdpQ8Q09mPnUS/ilMDcbwRgJhlyK4EtUhLX4W1VSL5zS7z3c66dTx6l25xUFj5tZzqQnvSzdINc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0D9C71007; Mon, 13 Nov 2023 06:28:26 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BAA8A3F7B4; Mon, 13 Nov 2023 06:27:39 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 22/22] arm: testsuite: improve compatibility of gcc.dg/debug/pr57351.c Date: Mon, 13 Nov 2023 14:26:58 +0000 Message-Id: <20231113142658.69039-23-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, 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.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 This test is arm specific and requires neon. To improve compatibility add a new test for armv7-a with neon and use that. gcc/testsuite: * lib/target-supports.exp (v7a_neon): New feature-test target. * gcc.dg/debug/pr57351.c: Use it. --- gcc/testsuite/gcc.dg/debug/pr57351.c | 7 +++---- gcc/testsuite/lib/target-supports.exp | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.dg/debug/pr57351.c b/gcc/testsuite/gcc.dg/debug/pr57351.c index 236d74ddedb..50861a4bf88 100644 --- a/gcc/testsuite/gcc.dg/debug/pr57351.c +++ b/gcc/testsuite/gcc.dg/debug/pr57351.c @@ -1,8 +1,7 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_neon } */ -/* { dg-require-effective-target arm_arch_v7a_ok } */ -/* { dg-options "-std=c99 -Os -g -march=armv7-a" } */ -/* { dg-add-options arm_neon } */ +/* { dg-require-effective-target arm_arch_v7a_neon_ok } */ +/* { dg-options "-std=c99 -Os -g" } */ +/* { dg-add-options arm_arch_v7a_neon } */ typedef unsigned int size_t; typedef int ptrdiff_t; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ae43dc97872..43a040e135c 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5425,6 +5425,7 @@ foreach { armfunc armflag armdefs } { v6m "-march=armv6-m -mthumb -mfloat-abi=soft" __ARM_ARCH_6M__ v7a "-march=armv7-a+fp" __ARM_ARCH_7A__ v7a_arm "-march=armv7-a+fp -marm" "__ARM_ARCH_7A__ && !__thumb__" + v7a_neon "-march=armv7-a+simd -mfpu=auto -mfloat-abi=softfp" "__ARM_ARCH_7A__ && __ARM_NEON__" v7r "-march=armv7-r+fp" __ARM_ARCH_7R__ v7m "-march=armv7-m -mthumb -mfloat-abi=soft" __ARM_ARCH_7M__ v7em "-march=armv7e-m+fp -mthumb" __ARM_ARCH_7EM__