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: 164510 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1242002vqg; Mon, 13 Nov 2023 06:33:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8p7hZ3iH0mXpWOjGIRaiPk+zRAc21QqrqaIJ0xGmJ6ds5kuq1cMSho+ZR998bCHFkU8y5 X-Received: by 2002:a0c:ff08:0:b0:672:5946:ffe7 with SMTP id w8-20020a0cff08000000b006725946ffe7mr6283296qvt.30.1699885979485; Mon, 13 Nov 2023 06:32:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699885979; cv=pass; d=google.com; s=arc-20160816; b=FXgPo2LmpAz8wUyDvYnFlcRc9O/s7Z57YZWyZ9fPlSf+pBPcpoGFncI7kWEkj5bIj6 rj+oy4dOFbzMqdaRzXCtAmC0LdpJCrWb9CDdR0IPH6U+2chyOBAVpRfjFNU7dlx9uKsx 4xGcquPugJMoKtp1tVvkjWLZZ905CQ+pKVz+32Adw+F4zK79+XIQvnT0F5LjTGloRH1E 1bnbpwKcyjE4nVPK6+5aWnOgCbuyfBClUJtodQvkQ0MKvmS7aqrbe4h1sBt8M6T2NKup U7M0yarTBxdfWugFjzF6d4xIa9lfZPkvM48LnRLMlkZro4oc59VN7YuHnrK2ZdesvPdN kQNQ== 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=wgWmFacvRX7nlLSAytGXtg+v2NV4Sp3HUUv82LkaSsk=; fh=vcPCoAFD9ELdvNMTpDIWpczE2wb0OD9E1jzZw6wSlzw=; b=d2Wqs4bkkEhm2UN46J2GiIHzGdbLeEGYAeIrPvzPAxfRw/fmn3Nvky7InicZ5Ix+BJ bBWRrvOdKu56hv9J7Dlz5w+xn2hc5Z2uASznc7D4N1glMp6usUTjlhk929w/QLUjOn09 ZkQVeiAmL+WcGzD2UfjNvHatIFNGn0ZSnngj+b1IXhKWOZ/1qeFQnAsxKubXCnFKbw/s lBqcuNnGL+cYH0K8F+Awg1DOi4AaBle62BLhf5ZE9dDHNBjq3meGD5xO7FWUpjSwd8Tr zeyLzF+mFLIVAksvL8fk4FdILqO02IBjbtbVxqb5R8Y6q+d0NfqraKCXXQ92oWLK+Rx9 76cQ== 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 8.43.85.97 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. [8.43.85.97]) by mx.google.com with ESMTPS id p15-20020a05620a112f00b00775cadf4e5csi4627413qkk.214.2023.11.13.06.32.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 06:32:59 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; 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 8.43.85.97 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 A771B383626B for ; Mon, 13 Nov 2023 14:29:34 +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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782459640973453259 X-GMAIL-MSGID: 1782459640973453259 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__