| 1 |
/* { dg-do compile { target ia32 } } */ |
| 2 |
/* { dg-options "-O2 -fomit-frame-pointer" } */ |
| 3 |
|
| 4 |
void foo (long long ixi) |
| 5 |
{ |
| 6 |
if (ixi != 14348907) |
| 7 |
__builtin_abort (); |
| 8 |
} |
| 9 |
|
| 10 |
/* { dg-final { scan-assembler-times "mov" 1 { target nonpic } } } */ |
| 11 |
/* get_pc_thunk adds an extra mov insn. */ |
| 12 |
/* Choosing a non-bx get_pc_thunk requires another mov before the abort call. |
| 13 |
So we require a match of either that mov or the get_pc_thunk.bx call, in |
| 14 |
addition to the other 2 movs. (Hopefully there won't be more calls for a |
| 15 |
false positive.) */ |
| 16 |
/* { dg-final { scan-assembler-times "mov|call\[^\n\r]*get_pc_thunk\.bx" 3 { target { ! nonpic } } } } */ |