x86: Add -mindirect-branch-register
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-register-3.c
blob5320e923be245c3f67ec280c124511349566cc7b
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mindirect-branch=thunk-extern -mindirect-branch-register -fno-pic" } */
4 typedef void (*dispatch_t)(long offset);
6 dispatch_t dispatch;
8 void
9 male_indirect_jump (long offset)
11 dispatch(offset);
14 /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
15 /* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
16 /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
17 /* { dg-final { scan-assembler-not {\t(pause|pause|nop)} } } */
18 /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
19 /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */