summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/m68k/interrupt-1.c
blob: 443c13b460edc553b72140cae93ec2cbe0048f4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler "j(ra|mp)\[ \t\]*interrupt_sibcall" } } */
/* { dg-final { scan-assembler "j(b|)sr\[ \t\]*interrupt_call" } } */
/* { dg-final { scan-assembler "j(ra|mp)\[ \t\]*normal_sibcall" } } */

void normal_sibcall (void);
void interrupt_call (void);
void __attribute ((interrupt)) interrupt_sibcall (void);

void normal (void)
{
  normal_sibcall ();
}

void __attribute ((interrupt)) interrupt (void)
{
  interrupt_call ();
}

void __attribute ((interrupt)) interrupt_2 (void)
{
  interrupt_sibcall ();
}