x86: Add -mindirect-branch-register
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-inline-3.c
blob9885eebbcfff0338f6de7b57862fef215bc24502
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;
8 int
9 male_indirect_jump (long offset)
11 dispatch(offset);
12 return 0;
15 /* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
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 } } } */