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) (unsigned int id, unsigned int len) 7 __attribute__((no_caller_saved_registers)); 8 unsigned int remaining; 9 10 void 11 __attribute__((no_caller_saved_registers)) handler(void)12handler(void) 13 { 14 while (1) { 15 if (remaining) { 16 callback(0, 0); 17 break; 18 } 19 } 20 } 21 22 void 23 __attribute__((interrupt)) my_isr(struct interrupt_frame * frame)24my_isr(struct interrupt_frame *frame) 25 { 26 handler(); 27 } 28 29 /* { dg-final { scan-assembler-times "\tcld" 1 } } */ 30