OSDN Git Service

PR tree-optimization/25125
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pragma-isr-trapa2.c
1 /* { dg-do compile { target sh-*-* sh4*-*-*} } */
2 /* { dg-options "-O -m4" } */
3
4 extern void foo ();
5 #pragma trapa
6 void
7 isr()
8 {
9   foo ();
10 }
11
12 /* { dg-final { scan-assembler-times "rte" 1} } */
13 /* No interrupt-specific saves should be needed.
14    The function call will require to load the address first into a register,
15    then use that for a jsr or jmp.  It will also need to load a constant
16    address in order to load fpscr.  */
17 /* { dg-final { scan-assembler-times "r\[0-7\]\n" 3 } } */
18 /* { dg-final { scan-assembler-not "r\[8-9\]" } } */
19 /* { dg-final { scan-assembler-not "r1\[,0-3\]" } } */
20 /* { dg-final { scan-assembler-not "macl" } } */
21 /* fpscr needs to be saved, loaded and restored.  */
22 /* { dg-final { scan-assembler-times "\[^_\]fpscr" 3 } } */