x86: Add -mindirect-branch-register
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-5.c
blobfcaa18d10b7fd36402b691be7175e1c2660d4dfb
1 /* { dg-do compile { target *-*-linux* } } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fpic -fno-plt -mindirect-branch=thunk" } */
4 extern void bar (void);
6 void
7 foo (void)
9 bar ();
12 /* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*bar@GOT" } } */
13 /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
14 /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
15 /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
16 /* { dg-final { scan-assembler {\tpause} } } */
17 /* { dg-final { scan-assembler {\tlfence} } } */