| 1 |
/* { dg-do compile { target ia32 } } */ |
| 2 |
/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -miamcu -maccumulate-outgoing-args" } */ |
| 3 |
|
| 4 |
struct interrupt_frame; |
| 5 |
|
| 6 |
void (*callback[1])(unsigned int id, unsigned int len); |
| 7 |
unsigned int remaining; |
| 8 |
|
| 9 |
void |
| 10 |
handler(int uart) |
| 11 |
{ |
| 12 |
while (1) { |
| 13 |
if (remaining) { |
| 14 |
callback[uart](0, 0); |
| 15 |
break; |
| 16 |
} |
| 17 |
} |
| 18 |
} |
| 19 |
|
| 20 |
int uart; |
| 21 |
|
| 22 |
void |
| 23 |
__attribute__((interrupt)) |
| 24 |
my_isr(struct interrupt_frame *frame) |
| 25 |
{ |
| 26 |
handler(uart); |
| 27 |
} |
| 28 |
|
| 29 |
/* { dg-final { scan-assembler-times "\tcld" 1 } } */ |