From: "Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>
To: "Torbjörn SVENSSON" <torbjorn.svensson@foss.st.com>,
gcc-patches@gcc.gnu.org
Cc: Richard.Ball@arm.com, christophe.lyon@linaro.org, yvan.roux@foss.st.com
Subject: Re: [PATCH v3 2/2] testsuite: Fix expand-return CMSE test for Armv8.1-M [PR115253]
Date: Tue, 11 Jun 2024 15:00:18 +0100 [thread overview]
Message-ID: <36780bb6-db67-4826-a8cd-0dd1f861bb67@arm.com> (raw)
In-Reply-To: <20240610140437.966245-3-torbjorn.svensson@foss.st.com>
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 <torbjorn.svensson@foss.st.com>
> Co-authored-by: Yvan ROUX <yvan.roux@foss.st.com>
> ---
> .../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 <arm_cmse.h>
> @@ -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.
next prev parent reply other threads:[~2024-06-11 14:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 16:43 [PATCH] arm: Zero/Sign extends for CMSE security on Armv8-M.baseline Torbjörn SVENSSON
2024-06-06 17:19 ` Christophe Lyon
2024-06-07 8:56 ` [PATH 0/2] arm: Zero/Sign extends for CMSE security on Torbjörn SVENSSON
2024-06-07 8:56 ` [PATCH v2 1/2] arm: Zero/Sign extends for CMSE security on Armv8-M.baseline [PR115253] Torbjörn SVENSSON
2024-06-10 10:37 ` Andre Vieira (lists)
2024-06-10 12:19 ` Torbjorn SVENSSON
2024-06-10 12:51 ` Andre Vieira (lists)
2024-06-10 14:04 ` [PATCH v3 0/2] " Torbjörn SVENSSON
2024-06-10 14:04 ` [PATCH v3 1/2] " Torbjörn SVENSSON
2024-06-11 13:59 ` Richard Earnshaw (lists)
2024-06-11 14:31 ` Andre Vieira (lists)
2024-06-12 12:16 ` Torbjorn SVENSSON
2024-06-12 21:15 ` Richard Sandiford
2024-06-10 14:04 ` [PATCH v3 2/2] testsuite: Fix expand-return CMSE test for Armv8.1-M [PR115253] Torbjörn SVENSSON
2024-06-11 14:00 ` Richard Earnshaw (lists) [this message]
2024-06-12 12:16 ` Torbjorn SVENSSON
2024-06-07 8:56 ` [PATCH v2 " Torbjörn SVENSSON
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=36780bb6-db67-4826-a8cd-0dd1f861bb67@arm.com \
--to=richard.earnshaw@arm.com \
--cc=Richard.Ball@arm.com \
--cc=christophe.lyon@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=torbjorn.svensson@foss.st.com \
--cc=yvan.roux@foss.st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).