* config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
[official-gcc.git] / gcc / testsuite / gcc.target / sh / rte-delay-slot.c
blobea5521275a33434f39258a7c7832561f368dbc9a
1 /* { dg-do compile { target { stack_save_isr } } } */
2 /* { dg-options "-O2" } */
3 /* { dg-final { scan-assembler-not "\trte\t\n\tmov.l\t@r15\\+" } } */
5 /* This test checks if the compiler generates a pop instruction
6 in the delay slot after rte. For the sh and sh2, the rte
7 instruction reads the return pc from the stack and any pop
8 in the delay slot crashes the hardware.
10 Incorrect code generated
11 mov.l @r15+,r1
12 rte
13 mov.l @r15+,r14
15 The right code should be
17 mov.l @r15+,r1
18 mov.l @r15+,r14
19 rte
20 nop
22 void INT_MTU2_1_TGIA1 (void)
23 __attribute__ ((interrupt_handler));
24 void
25 INT_MTU2_1_TGIA1 (void)
27 volatile int i = 0;
28 volatile int x, y;
30 for (i = 0; i < 10; i++)
31 y = y + x;