2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-extern-3.c
blob385626850a205b5577a3febf0f6f3d9d8928369f
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;
8 int
9 male_indirect_jump (long offset)
11 dispatch(offset);
12 return 0;
15 /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
16 /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
17 /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
18 /* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
19 /* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */