diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/interrupt-switch-abi.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/interrupt-switch-abi.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/interrupt-switch-abi.c b/gcc/testsuite/gcc.target/i386/interrupt-switch-abi.c new file mode 100644 index 00000000000..f23e6f9870c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/interrupt-switch-abi.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mno-mpx -mno-sse -mno-mmx -mno-80387 -mno-cld" } */ + +extern void bar (int); + +void f1 (void){ bar (1); } +__attribute__((interrupt)) +void f2 (void *frame){ bar (2); } +void f3 (void){ bar (3); } +__attribute__((interrupt)) +void f4 (void *frame){ bar (4); } +void f5 (void){ bar (5); } + +/* { dg-final { scan-assembler-times "push.\t%.ax" 2 } } */ +/* { dg-final { scan-assembler-times "pop.\t%.ax" 2 } } */ +/* { dg-final { scan-assembler-times "iret" 2 { target ia32 } } } */ +/* { dg-final { scan-assembler-times "iretq" 2 { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-times "\tcld" 2 } } */ |