From patchwork Sun Dec 10 19:53:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 81830 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 882773858283 for ; Sun, 10 Dec 2023 19:54:00 +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 3F78538582B3 for ; Sun, 10 Dec 2023 19:53:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3F78538582B3 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 3F78538582B3 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=1702238025; cv=none; b=rPaTPAimIR+oehme1zqXxmQcbJb2hu+QYi+HNUJI2swpK/6XtJLFrj5ZHqOOhH65i1WmORj2JZcmlbWpkhqzjjUTQFMPCIGW8VvsSzUUO0OzM9x/aWVP6xu+s7nbGS5H2NqRgIqdj9sHoCTuPN4CRHm+vdSg51ncZR5mRqqJ/Hw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702238025; c=relaxed/simple; bh=31wHOx6wjWaScC03fl9yW9JrWtfPwyy5Hz2LxCUgkBw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Nkt6hnlKAGj/6U6OOxUfN/BWPJ6f/PDjLbNmB81TXSdF7OJoYeCtpR4Y/iN4BSWeBXfomUG6bevDVBav26ANR/aR3EoErC0oWyjWsqHLV7tUD1yjBCT1x4VonSD8TtxsbmAL7TnErLMoRmXhI7Lc6Bpz4PPIq1sPBsX/MREeSdA= 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 22387FEC for ; Sun, 10 Dec 2023 11:54:30 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9C94B3F738 for ; Sun, 10 Dec 2023 11:53:43 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [pushed] aarch64: Skip some SME register save tests on BE Date: Sun, 10 Dec 2023 19:53:42 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-21.9 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+patchwork=sourceware.org@gcc.gnu.org Big-endian targets need to save Z8-Z15 in the same order as the registers would appear for D8-D15, because the layout is mandated by the EH ABI. BE targets therefore use ST1D instead of the normal STR for those registers (but not for others). That difference is already tested elsewhere and isn't important for the SME tests. This patch therefore restricts the affected tests to LE. Tested on aarch64-linux-gnu and aarch64_be-elf, pushed to trunk. Richard gcc/testsuite/ * gcc.target/aarch64/sme/call_sm_switch_5.c: Restrict tests that contain Z8-Z23 saves to little-endian. * gcc.target/aarch64/sme/call_sm_switch_8.c: Likewise. * gcc.target/aarch64/sme/locally_streaming_1.c: Likewise. --- gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c | 6 +++--- gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c | 6 +++--- gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c index e3d9bc274d8..6238ab80da2 100644 --- a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c +++ b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_5.c @@ -14,7 +14,7 @@ struct callbacks { }; /* -** n_caller: { target lp64 } +** n_caller: { target { lp64 && aarch64_little_endian } } ** stp x30, (x19|x2[0-8]), \[sp, #?-32\]! ** cntd x16 ** str x16, \[sp, #?16\] @@ -114,7 +114,7 @@ n_caller (struct callbacks *c) } /* -** s_caller: { target lp64 } +** s_caller: { target { lp64 && aarch64_little_endian } } ** stp x30, (x19|x2[0-8]), \[sp, #?-32\]! ** cntd x16 ** str x16, \[sp, #?16\] @@ -214,7 +214,7 @@ s_caller (struct callbacks *c) [[arm::streaming]] } /* -** sc_caller: +** sc_caller: { target aarch64_little_endian } ** stp x29, x30, \[sp, #?-32\]! ** mov x29, sp ** cntd x16 diff --git a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c index f44724df32f..c909b34ff5e 100644 --- a/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c +++ b/gcc/testsuite/gcc.target/aarch64/sme/call_sm_switch_8.c @@ -7,7 +7,7 @@ svint8_t produce_z0 (); void consume_z0 (svint8_t); /* -** test_z0: +** test_z0: { target aarch64_little_endian } ** ... ** smstop sm ** bl produce_z0 @@ -32,7 +32,7 @@ svint8x4_t produce_z3 (); void consume_z3 (svint8x4_t); /* -** test_z3: +** test_z3: { target aarch64_little_endian } ** ... ** smstop sm ** bl produce_z3 @@ -61,7 +61,7 @@ svbool_t produce_p0 (); void consume_p0 (svbool_t); /* -** test_p0: +** test_p0: { target aarch64_little_endian } ** ... ** smstop sm ** bl produce_p0 diff --git a/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c b/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c index 20ff4b87d94..4bb637f4781 100644 --- a/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c +++ b/gcc/testsuite/gcc.target/aarch64/sme/locally_streaming_1.c @@ -265,7 +265,7 @@ n_ls_vector_pcs () } /* -** n_ls_sve_pcs: +** n_ls_sve_pcs: { target aarch64_little_endian } ** sub sp, sp, #?16 ** cntd x16 ** str x16, \[sp\]