From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 81EE5385DDFB for ; Tue, 11 Jun 2024 14:00:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 81EE5385DDFB 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 81EE5385DDFB 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=1718114422; cv=none; b=kGLPS9c7gUOZBE37YVL6rcVyZCDxEs6PqpQdRLHJbOs46kTjW0M6X7xIQT484qw5C2i6uo/9rwTbveXvC8Y+rt7k/kbPHMxpig6mYTN8ogXg5NanSW9QS4hqFSkZXhawd0eoFQMue6YyB8214hd6BqE2zWxXdib+wMZnX9XF8aA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718114422; c=relaxed/simple; bh=Q/hnK6lySVlOwVKdMRSbv/cJt0kUA8DuEpW7sa3y4xI=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=dRuwfCRS2SLTqYC6ocI7FacUumeARYpiB6p8cOlU1DMzN2pj6Midi6YlQ/g6gpP3X7CbJlswQti6zyBZVKKBLcMU4P/OJJuOhNrAL30b7s4TnbafMzIidN7gDEr5sy8jnlw2n3NiFIaNYr4Pc8c0RlPaa9noxUPYt/pTevanWf0= 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 B5497152B; Tue, 11 Jun 2024 07:00:44 -0700 (PDT) Received: from [10.2.78.57] (e120077-lin.cambridge.arm.com [10.2.78.57]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5E2443F5A1; Tue, 11 Jun 2024 07:00:19 -0700 (PDT) Message-ID: <36780bb6-db67-4826-a8cd-0dd1f861bb67@arm.com> Date: Tue, 11 Jun 2024 15:00:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/2] testsuite: Fix expand-return CMSE test for Armv8.1-M [PR115253] To: =?UTF-8?Q?Torbj=C3=B6rn_SVENSSON?= , gcc-patches@gcc.gnu.org Cc: Richard.Ball@arm.com, christophe.lyon@linaro.org, yvan.roux@foss.st.com References: <51e7905e-60da-27ae-19c1-286128899e93@arm.com> <20240610140437.966245-1-torbjorn.svensson@foss.st.com> <20240610140437.966245-3-torbjorn.svensson@foss.st.com> From: "Richard Earnshaw (lists)" Content-Language: en-GB In-Reply-To: <20240610140437.966245-3-torbjorn.svensson@foss.st.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3497.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 List-Id: On 10/06/2024 15:04, Torbjörn SVENSSON wrote: > For Armv8.1-M, the clearing of the registers is handled differently than > for Armv8-M, so update the test case accordingly. > > gcc/testsuite/ChangeLog: > > PR target/115253 > * gcc.target/arm/cmse/extend-return.c: Update test case > condition for Armv8.1-M. > > Signed-off-by: Torbjörn SVENSSON > Co-authored-by: Yvan ROUX > --- > .../gcc.target/arm/cmse/extend-return.c | 62 +++++++++++++++++-- > 1 file changed, 56 insertions(+), 6 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/arm/cmse/extend-return.c b/gcc/testsuite/gcc.target/arm/cmse/extend-return.c > index 081de0d699f..2288d166bd3 100644 > --- a/gcc/testsuite/gcc.target/arm/cmse/extend-return.c > +++ b/gcc/testsuite/gcc.target/arm/cmse/extend-return.c > @@ -1,5 +1,7 @@ > /* { dg-do compile } */ > /* { dg-options "-mcmse -fshort-enums" } */ > +/* ARMv8-M expectation with target { ! arm_cmse_clear_ok }. */ > +/* ARMv8.1-M expectation with target arm_cmse_clear_ok. */ > /* { dg-final { check-function-bodies "**" "" "" } } */ > > #include > @@ -20,7 +22,15 @@ typedef enum offset __attribute__ ((cmse_nonsecure_call)) ns_enum_foo_t (void); > typedef bool __attribute__ ((cmse_nonsecure_call)) ns_bool_foo_t (void); > > /* > -**unsignNonsecure0: > +**unsignNonsecure0: { target arm_cmse_clear_ok } > +** ... > +** blxns r[0-3] > +** ... > +** uxtb r0, r0 > +** ... > +*/ > +/* > +**unsignNonsecure0: { target { ! arm_cmse_clear_ok } } > ** ... > ** bl __gnu_cmse_nonsecure_call > ** uxtb r0, r0 > @@ -32,7 +42,15 @@ unsigned char unsignNonsecure0 (ns_unsign_foo_t * ns_foo_p) > } > > /* > -**signNonsecure0: > +**signNonsecure0: { target arm_cmse_clear_ok } > +** ... > +** blxns r[0-3] > +** ... > +** sxtb r0, r0 > +** ... > +*/ > +/* > +**signNonsecure0: { target { ! arm_cmse_clear_ok } } > ** ... > ** bl __gnu_cmse_nonsecure_call > ** sxtb r0, r0 > @@ -44,7 +62,15 @@ signed char signNonsecure0 (ns_sign_foo_t * ns_foo_p) > } > > /* > -**shortUnsignNonsecure0: > +**shortUnsignNonsecure0: { target arm_cmse_clear_ok } > +** ... > +** blxns r[0-3] > +** ... > +** uxth r0, r0 > +** ... > +*/ > +/* > +**shortUnsignNonsecure0: { target { ! arm_cmse_clear_ok } } > ** ... > ** bl __gnu_cmse_nonsecure_call > ** uxth r0, r0 > @@ -56,7 +82,15 @@ unsigned short shortUnsignNonsecure0 (ns_short_unsign_foo_t * ns_foo_p) > } > > /* > -**shortSignNonsecure0: > +**shortSignNonsecure0: { target arm_cmse_clear_ok } > +** ... > +** blxns r[0-3] > +** ... > +** sxth r0, r0 > +** ... > +*/ > +/* > +**shortSignNonsecure0: { target { ! arm_cmse_clear_ok } } > ** ... > ** bl __gnu_cmse_nonsecure_call > ** sxth r0, r0 > @@ -68,7 +102,15 @@ signed short shortSignNonsecure0 (ns_short_sign_foo_t * ns_foo_p) > } > > /* > -**enumNonsecure0: > +**enumNonsecure0: { target arm_cmse_clear_ok } > +** ... > +** blxns r[0-3] > +** ... > +** uxtb r0, r0 > +** ... > +*/ > +/* > +**enumNonsecure0: { target { ! arm_cmse_clear_ok } } > ** ... > ** bl __gnu_cmse_nonsecure_call > ** uxtb r0, r0 > @@ -80,7 +122,15 @@ unsigned char __attribute__((noipa)) enumNonsecure0 (ns_enum_foo_t * ns_foo_p) > } > > /* > -**boolNonsecure0: > +**boolNonsecure0: { target arm_cmse_clear_ok } > +** ... > +** blxns r[0-3] > +** ... > +** uxtb r0, r0 > +** ... > +*/ > +/* > +**boolNonsecure0: { target { ! arm_cmse_clear_ok } } > ** ... > ** bl __gnu_cmse_nonsecure_call > ** uxtb r0, r0 OK when the nits in the first patch are sorted. R.