1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_arch_v8m_base_ok } */
3 /* { dg-add-options arm_arch_v8m_base } */
4 /* { dg-additional-options "-mcmse -Os" } */
5 /* { dg-final { check-function-bodies "**" "" } } */
6
7 int __attribute__ ((cmse_nonsecure_entry))
8 foo (void)
9 {
10 return 1;
11 }
12 /* { { dg-final { scan-assembler-not "mov\tr9, r0" } } */
13
14 /*
15 ** __acle_se_bar:
16 ** mov (r[0-3]), r9
17 ** push {\1}
18 ** ...
19 ** pop {(r[0-3])}
20 ** mov r9, \2
21 ** ...
22 ** bxns lr
23 */
24 int __attribute__ ((cmse_nonsecure_entry))
25 bar (void)
26 {
27 __asm__ ("" : : : "r9");
28 return 1;
29 }