2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / interrupt-20.c
blob0861ffe3185783bf546cce4a6fffc12897a89765
1 /* { dg-do compile { target ia32 } } */
2 /* { dg-options "-O2 -mgeneral-regs-only -mno-cld -miamcu -maccumulate-outgoing-args" } */
4 struct interrupt_frame;
6 void (*callback[1])(unsigned int id, unsigned int len);
7 unsigned int remaining;
9 void
10 handler(int uart)
12 while (1) {
13 if (remaining) {
14 callback[uart](0, 0);
15 break;
20 int uart;
22 void
23 __attribute__((interrupt))
24 my_isr(struct interrupt_frame *frame)
26 handler(uart);
29 /* { dg-final { scan-assembler-times "\tcld" 1 } } */