PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-extern-2.c
blob826425a5115021d1b3c836f2afda53a07b61731c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
4 typedef void (*dispatch_t)(long offset);
6 dispatch_t dispatch[256];
8 void
9 male_indirect_jump (long offset)
11 dispatch[offset](offset);
14 /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
15 /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
16 /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
17 /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
18 /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */