Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.target / arc / firq-1.c
blob87f408793dc9fbfefe5c756580ade194b3e58418
1 /* { dg-do compile } */
2 /* { dg-require-effective-target archs }*/
3 /* { dg-options "-O0 -mll64 -mirq-ctrl-saved=r0-r9" } */
5 /* Check that on archs the 'firq' interrupt function type is
6 available, these are the fast interrupts. For fast interrupts,
7 despite the use of 'irq-ctrl-saved', no registers are automatically
8 saved on entry to the function, and so, in the following register
9 r0 to r9 should all be saved to the stack.
11 We also take the opportunity to check the use of the 'rtie'
12 instruction at the end of the interrupt function. */
14 void __attribute__ ((interrupt("firq")))
15 handler1 (void)
17 asm (""
20 : "r0", "r1", "r2", "r3", "r4",
21 "r5", "r6", "r7", "r8", "r9");
23 /* { dg-final { scan-assembler-times "r2,\\\[sp,\[0-9\]+\\\]" 2 } } */
24 /* { dg-final { scan-assembler-times "r4,\\\[sp,\[0-9\]+\\\]" 2 } } */
25 /* { dg-final { scan-assembler-times "r6,\\\[sp,\[0-9\]+\\\]" 2 } } */
26 /* { dg-final { scan-assembler-times "r8,\\\[sp,\[0-9\]+\\\]" 2 } } */
27 /* { dg-final { scan-assembler "rtie" } } */