testsuite: Fix expand-return CMSE test for Armv8.1-M [PR115253]

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>
(cherry picked from commit cf5f9171bae1f5f3034dc9a055b77446962f1a8c)
This commit is contained in:
Torbjörn SVENSSON 2024-06-07 10:42:22 +02:00
parent a657148995
commit 9100e78ba2

View file

@ -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