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: 164512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1242534vqg; Mon, 13 Nov 2023 06:33:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHkjAKlaw821kKY1DA0a2z0BgfOdy1BwIGkRa7UXClaRJKH0CQxcxfuxqMTx4aPkYabxqNa X-Received: by 2002:a05:620a:4014:b0:774:21d8:b0bb with SMTP id h20-20020a05620a401400b0077421d8b0bbmr9835143qko.24.1699886030529; Mon, 13 Nov 2023 06:33:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699886030; cv=pass; d=google.com; s=arc-20160816; b=Ig93m7qq85JoAiHpE5zdqu/jRfe7e5KmbwrFZVCF4gCvQ1xNik8oXxeFs8OkjdTDcZ 8anB9vs02h+XLNoJCthmnz9z8Zt8T+3RhHzdYJd4lmKzkT+fSt45x8MKCixtucRo4PD9 CZtrpEFwM0UV6a2lnZ28RLuzEzUjvd9E50dfAxfUUvk1ZlPBzlfcPE2qjeJhE4WlGsqj 9hKENSh1BKQqcrVqjWcAme75fOukzoPS0fXm5aNy65MSn5KYWU4aS4FzJKWtMxrmmouG Ahi5gaFRWXvb2AqUY2nO4+1N7qG9xdqfSPPcpBPPI/0fhYFk0iP+0wLfeZEG/6WgMRZM KyFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to; bh=NG3JXkRIrgxVzLwsedeiqqhEdb6+mUaUl3W5KCEbcGQ=; fh=vcPCoAFD9ELdvNMTpDIWpczE2wb0OD9E1jzZw6wSlzw=; b=cch+mYV6a1Q6/cQTD43RObJ6hnbnaA7cm0cvdNb06tPkrLf8kSJsj2a521YofJ9PXZ zRkXAgULU3XKO8cs1+DZ0QP2+lrKAC3Jf37krSBco6w86MxyAahQAqHkCB5snEghNKGy Okec8G0WFGdzaK6RlZiYrBHTn9vrdD+roBiwi3Rl3UNgzRxxIqglBIPWETkLGXM8KpyZ +brR+KKAYPYtBcP9Z+ZWSh9R8IwFbyivuCZJEzqQZZAzx8e8S3RyRghjBBtHg+Ta+hU5 NJYdT4dR70DrOm63vwtMB4BJ5mVpkcdj+i07zgB4Uh7/0g5rJLGCNaP8VaMsXwdYW5S8 +KQA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id s6-20020a05620a254600b007770c0ebe08si4730011qko.14.2023.11.13.06.33.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 06:33:50 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3874138BF24C for ; Mon, 13 Nov 2023 14:29:58 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782459694153576442 X-GMAIL-MSGID: 1782459694153576442 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"