(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
i386/
interrupt-21.c
       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  __attribute__((no_caller_saved_registers))
      11  handler(int uart)
      12  {
      13    while (1) {
      14      if (remaining) {
      15        callback[uart](0, 0);
      16        break;
      17      }
      18    }
      19  }
      20  
      21  int uart;
      22  
      23  void
      24  __attribute__((interrupt))
      25  my_isr(struct interrupt_frame *frame)
      26  {
      27    handler(uart);
      28  }
      29  
      30  /* { dg-final { scan-assembler-times "\tcld" 1 } } */