| 1 |
/* Test -mfentry override */ |
| 2 |
/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ |
| 3 |
/* { dg-require-effective-target mfentry } */ |
| 4 |
/* { dg-options "-mfentry" } */ |
| 5 |
/* { dg-final { scan-assembler-not "__fentry__" } } */ |
| 6 |
/* Origin: Andi Kleen */ |
| 7 |
extern void foobar(const char *); |
| 8 |
|
| 9 |
void __attribute__((no_instrument_function)) func(void) |
| 10 |
{ |
| 11 |
foobar ("Hello world\n"); |
| 12 |
} |
| 13 |
|
| 14 |
void __attribute__((no_instrument_function)) func2(void) |
| 15 |
{ |
| 16 |
int i; |
| 17 |
for (i = 0; i < 10; i++) |
| 18 |
foobar ("Hello world"); |
| 19 |
} |