| 1 |
/* { dg-do compile } */ |
| 2 |
/* Force an FPU to test that it is ignored for Thumb-1 -like targets and that |
| 3 |
no clearing of VFP register occurs. */ |
| 4 |
/* { dg-options "-mcmse -mfloat-abi=softfp -mfpu=fpv5-d16" } */ |
| 5 |
|
| 6 |
double __attribute__ ((cmse_nonsecure_call)) (*bar) (float, double); |
| 7 |
|
| 8 |
double |
| 9 |
foo (double a) |
| 10 |
{ |
| 11 |
return bar (1.0f, 2.0) + a; |
| 12 |
} |
| 13 |
|
| 14 |
float __attribute__ ((cmse_nonsecure_entry)) |
| 15 |
baz (float a, double b) |
| 16 |
{ |
| 17 |
return (float) bar (a, b); |
| 18 |
} |
| 19 |
|
| 20 |
/* Make sure we are not using FP instructions, since ARMv8-M Baseline does not |
| 21 |
support such instructions. */ |
| 22 |
/* { dg-final { scan-assembler-not "vmov" } } */ |
| 23 |
/* { dg-final { scan-assembler-not "vmsr" } } */ |
| 24 |
/* { dg-final { scan-assembler-not "vmrs" } } */ |
| 25 |
|
| 26 |
/* Just double checking that we are still doing cmse though. */ |
| 27 |
/* { dg-final { scan-assembler-not "vmrs" } } */ |
| 28 |
/* { dg-final { scan-assembler "bl\t__gnu_cmse_nonsecure_call" } } */ |
| 29 |
|