Side by Side Diff: gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c
Issue 7301068 :
[google] Port revisions for -mpatch-functions-for-instrumentation option back to google-main.
Patch Set: [google] Port revisions for -mpatch-functions-for-instrumentation option back to google-main.
Use n/p to move between diff chunks;
N/P to move between comments.
Please Sign in to add in-line comments.
Jump to:
gcc/c-family/c-common.c
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/config/i386/i386.opt
gcc/config/i386/i386-protos.h
gcc/params.def
gcc/testsuite/gcc.target/i386/patch-functions-1.c
gcc/testsuite/gcc.target/i386/patch-functions-2.c
gcc/testsuite/gcc.target/i386/patch-functions-3.c
gcc/testsuite/gcc.target/i386/patch-functions-4.c
gcc/testsuite/gcc.target/i386/patch-functions-5.c
gcc/testsuite/gcc.target/i386/patch-functions-6.c
gcc/testsuite/gcc.target/i386/patch-functions-7.c
gcc/testsuite/gcc.target/i386/patch-functions-8.c
gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c
gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c
gcc/testsuite/gcc.target/i386/patch-functions-sibling-call.c
OLD NEW
(Empty) 1 /* { dg-do compile } */
2 /* { dg-require-effective-target lp64 } */
3 /* { dg-options "-mpatch-functions-for-instrumentation -mno-patch-functions-main
-always" } */
4
5 /* Even complicated functions shouldn't get patched if they have the
6 never_patch_for_instrumentation attribute. */
7
8 /* { dg-final { scan-assembler-not ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
9 /* { dg-final { scan-assembler-not "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
10
11 __attribute__ ((never_patch_for_instrumentation))
12 int foo () {
13 volatile unsigned x = 0;
14 volatile unsigned y = 1;
15 x += y;
16 x *= y;
17 while (++x)
18 foo ();
19 return y;
20 }
21
22
23 int main ()
24 {
25 int x = 0;
26 return 0;
27 }
OLD NEW