| 1 |
/* Check that no interrupt-specific register saves are generated. |
| 2 |
The function call will require to load the address first into a register, |
| 3 |
then use that for a jsr or jmp. It will also need to load a constant |
| 4 |
address in order to load fpscr. */ |
| 5 |
/* { dg-do compile { target { { any_fpu } && nonpic } } } */ |
| 6 |
/* { dg-options "-O" } */ |
| 7 |
/* { dg-final { scan-assembler-times "rte" 1 } } */ |
| 8 |
/* { dg-final { scan-assembler-not "mov.l\tr\[0-9\],@-r15" } } */ |
| 9 |
/* { dg-final { scan-assembler-not "mov.l\tr1\[0-4\],@-r15" } } */ |
| 10 |
/* { dg-final { scan-assembler-not "macl" } } */ |
| 11 |
|
| 12 |
/* Expect that fpscr needs to be saved, loaded and restored. */ |
| 13 |
/* { dg-final { scan-assembler-times "\[^_\]fpscr" 4 } } */ |
| 14 |
|
| 15 |
extern void foo (void); |
| 16 |
|
| 17 |
#pragma trapa |
| 18 |
void |
| 19 |
isr (void) |
| 20 |
{ |
| 21 |
foo (); |
| 22 |
} |