2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-inline-4.c
bloba395ffca018b1982c47d0798540cf18bf8b34c12
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
4 typedef void (*dispatch_t)(long offset);
6 dispatch_t dispatch[256];
8 int
9 male_indirect_jump (long offset)
11 dispatch[offset](offset);
12 return 0;
15 /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
16 /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
17 /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
18 /* { dg-final { scan-assembler-times {\tpause} 1 } } */
19 /* { dg-final { scan-assembler-times {\tlfence} 1 } } */
20 /* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
21 /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */