Ok for trunk and releases/gcc-14? --
Since armv8-m.base uses thumb1 that does not suport sigcall/tailcall, a pattern is needed that uses PUSH/BL/POP sequence instead of a single B instruction to reuse an already existing function in the compile unit. gcc/testsuite/ChangeLog: * gcc.target/arm/cmse/cmse-15.c: Added pattern for armv8-m.base. Signed-off-by: Torbjörn SVENSSON <torbjorn.svens...@foss.st.com> --- gcc/testsuite/gcc.target/arm/cmse/cmse-15.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c index 5188f1d697f..0e35830c35e 100644 --- a/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c +++ b/gcc/testsuite/gcc.target/arm/cmse/cmse-15.c @@ -65,6 +65,10 @@ int nonsecure1 (ns_foo_t ** ns_foo_p) ** bl __gnu_cmse_nonsecure_call ** | ** b nonsecure0 +** | +** push {r4, lr} +** bl nonsecure0 +** pop {r4, pc} ** ) ** ... */ @@ -129,6 +133,10 @@ int secure1 (s_bar_t ** s_bar_p) ** blx r[0-3] ** | ** b secure0 +** | +** push {r4, lr} +** bl secure0 +** pop {r4, pc} ** ) ** ... */ @@ -146,6 +154,10 @@ int secure2 (s_bar_ptr s_bar_p) ** blx r[0-3] ** | ** b secure1 +** | +** push {r4, lr} +** bl secure1 +** pop {r4, pc} ** ) ** ... */ -- 2.25.1