Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(637)

Unified Diff: gcc/config/i386/i386.md

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. Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/config/i386/i386.c ('k') | gcc/config/i386/i386.opt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/config/i386/i386.md
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 24d1012..3b16829 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -11708,7 +11708,18 @@
(define_insn "simple_return_internal"
[(simple_return)]
"reload_completed"
- "ret"
+{
+ if (TARGET_64BIT && patch_functions_for_instrumentation)
+ {
+ /* Emit 10 nop bytes after ret. */
+ if (ix86_output_function_nops_prologue_epilogue (asm_out_file,
+ FUNCTION_PATCH_EPILOGUE_SECTION,
+ "\tret",
+ 10))
+ return "";
+ }
+ return "ret";
+}
[(set_attr "length" "1")
(set_attr "atom_unit" "jeu")
(set_attr "length_immediate" "0")
@@ -11721,7 +11732,18 @@
[(simple_return)
(unspec [(const_int 0)] UNSPEC_REP)]
"reload_completed"
- "rep%; ret"
+{
+ if (TARGET_64BIT && patch_functions_for_instrumentation)
+ {
+ /* Emit 9 nop bytes after rep;ret. */
+ if (ix86_output_function_nops_prologue_epilogue (asm_out_file,
+ FUNCTION_PATCH_EPILOGUE_SECTION,
+ "\trep\;ret",
+ 9))
+ return "";
+ }
+ return "rep\;ret";
+}
[(set_attr "length" "2")
(set_attr "atom_unit" "jeu")
(set_attr "length_immediate" "0")
« no previous file with comments | « gcc/config/i386/i386.c ('k') | gcc/config/i386/i386.opt » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b