aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/arm/interrupt-2.c
blob: 61d313053675e3f628b6f51ae63eda40d498af9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Verify that prologue and epilogue are correct for functions with
   __attribute__ ((interrupt)).  */
/* { dg-do compile } */
/* { dg-require-effective-target arm_nothumb } */
/* { dg-options "-O1 -marm" } */

/* This test is not valid when -mthumb.  */
extern void bar (int);
extern void test (void) __attribute__((__interrupt__));

int foo;
void test()
{
  bar (foo);
  foo = 0;
}

/* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, lr}" } } */
/* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}\\^" } } */