aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/interrupt-sibcall-2.c
blob: df0639a07bb1f6901d73a66d2f8a86f985b3ab78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O3 -mgeneral-regs-only -mno-cld" } */
/* { dg-additional-options "-mpreferred-stack-boundary=3" { target { ! ia32 } } }  */
/* { dg-additional-options "-mpreferred-stack-boundary=2" { target ia32 } } */

extern void foo (void *) __attribute__ ((interrupt));
extern void bar (void) __attribute__ ((no_caller_saved_registers));

void foo (void *frame)
{
  bar ();
}
/* { dg-final { scan-assembler-not "jmp" } } */
/* { dg-final { scan-assembler-times "iret" 1 { target ia32 } } } */
/* { dg-final { scan-assembler-times "iretq" 1 { target { ! ia32 } } } } */
/* { dg-final { scan-assembler-times "\tcld" 1 } } */