Add some more test cases for fentry and pg
Test fentry and no_instrument_function overriding. gcc/testsuite/: 2014-09-15 Andi Kleen <ak@linux.intel.com> * gcc.dg/pg-override.c: New test. * gcc.dg/pg.c: New test. * gcc.target/i386/fentry-override.c: New test. * gcc.target/i386/fentry.c: New test. From-SVN: r215285
This commit is contained in:
parent
0b37ba8a60
commit
a86507b29e
@ -1,3 +1,10 @@
|
||||
2014-09-15 Andi Kleen <ak@linux.intel.com>
|
||||
|
||||
* gcc.dg/pg-override.c: New test.
|
||||
* gcc.dg/pg.c: New test.
|
||||
* gcc.target/i386/fentry-override.c: New test.
|
||||
* gcc.target/i386/fentry.c: New test.
|
||||
|
||||
2014-09-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/56408
|
||||
|
18
gcc/testsuite/gcc.dg/pg-override.c
Normal file
18
gcc/testsuite/gcc.dg/pg-override.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Test -fprofile override */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fprofile" { target { { i686-*-* x86_64-*-* } } } } */
|
||||
/* { dg-final { scan-assembler-not "mcount" } } */
|
||||
/* Origin: Andi Kleen */
|
||||
extern void foobar(const char *);
|
||||
|
||||
__attribute__((no_instrument_function)) void func(void)
|
||||
{
|
||||
foobar ("Hello world\n");
|
||||
}
|
||||
|
||||
__attribute__((no_instrument_function)) void func2(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i++)
|
||||
foobar ("Hello world");
|
||||
}
|
18
gcc/testsuite/gcc.dg/pg.c
Normal file
18
gcc/testsuite/gcc.dg/pg.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Test -fprofile override */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fprofile" { target { { i686-*-* x86_64-*-* } } } } */
|
||||
/* { dg-final { scan-assembler-not "mcount" } } */
|
||||
/* Origin: Andi Kleen */
|
||||
extern void foobar(const char *);
|
||||
|
||||
__attribute__((no_instrument_function)) void func(void)
|
||||
{
|
||||
foobar ("Hello world\n");
|
||||
}
|
||||
|
||||
__attribute__((no_instrument_function)) void func2(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i++)
|
||||
foobar ("Hello world");
|
||||
}
|
18
gcc/testsuite/gcc.target/i386/fentry-override.c
Normal file
18
gcc/testsuite/gcc.target/i386/fentry-override.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Test -mfentry override */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-mfentry" } */
|
||||
/* { dg-final { scan-assembler-not "__fentry__" } } */
|
||||
/* Origin: Andi Kleen */
|
||||
extern void foobar(const char *);
|
||||
|
||||
void __attribute__((no_instrument_function)) func(void)
|
||||
{
|
||||
foobar ("Hello world\n");
|
||||
}
|
||||
|
||||
void __attribute__((no_instrument_function)) func2(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i++)
|
||||
foobar ("Hello world");
|
||||
}
|
18
gcc/testsuite/gcc.target/i386/fentry.c
Normal file
18
gcc/testsuite/gcc.target/i386/fentry.c
Normal file
@ -0,0 +1,18 @@
|
||||
/* Test -mfentry */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fprofile -mfentry" } */
|
||||
/* { dg-final { scan-assembler "__fentry__" } } */
|
||||
/* Origin: Andi Kleen */
|
||||
extern void foobar(const char *);
|
||||
|
||||
void func(void)
|
||||
{
|
||||
foobar ("Hello world\n");
|
||||
}
|
||||
|
||||
void func2(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 10; i++)
|
||||
foobar ("Hello world");
|
||||
}
|
Loading…
Reference in New Issue
Block a user