PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / indirect-thunk-bnd-1.c
blob73d16baddc7e743caafdac2e74305dbc03933ab0
1 /* { dg-do compile { target { ! x32 } } } */
2 /* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
4 void (*dispatch) (char *);
5 char buf[10];
7 void
8 foo (void)
10 dispatch (buf);
13 /* { dg-final { scan-assembler "mov(?:l|q)\[ \t\]*_?dispatch" { target *-*-linux* } } } */
14 /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd_rax" { target lp64 } } } */
15 /* { dg-final { scan-assembler "bnd call\[ \t\]*__x86_indirect_thunk_bnd_eax" { target ia32 } } } */
16 /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
17 /* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
18 /* { dg-final { scan-assembler "bnd ret" } } */
19 /* { dg-final { scan-assembler {\tpause} } } */
20 /* { dg-final { scan-assembler {\tlfence} } } */