diff options
author | Iain Sandoe <iains@gcc.gnu.org> | 2011-01-07 13:57:45 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2011-01-07 13:57:45 +0000 |
commit | 14d11d4097091e8abaa63866f8cc0903f581c82a (patch) | |
tree | cf51df2cf5cae2810e51692d844e2d9afa6b187f /gcc/final.c | |
parent | 0b764288f97fbb0f33b42c66ebffc061ba59cb7d (diff) | |
download | gcc-14d11d4097091e8abaa63866f8cc0903f581c82a.zip gcc-14d11d4097091e8abaa63866f8cc0903f581c82a.tar.gz gcc-14d11d4097091e8abaa63866f8cc0903f581c82a.tar.bz2 |
allow the target to label code fragments generated by partitioning.
* target.def (function_switched_text_sections): New Hook.
* doc/tm.texi Regenerated.
* doc/tm.texi.in (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS)
New.
* final.c (default_function_switched_text_sections): New.
(final_scan_insn): Call function_switched_text_sections when a mid-function section
change occurs.
* output.h (default_function_switched_text_sections): Declare.
* config/darwin-protos.h (darwin_function_switched_text_sections) : Likewise.
* config/darwin.c (darwin_function_switched_text_sections): New.
* config/darwin.h (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS)
New.
From-SVN: r168571
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c index ebe21b6..09dec08 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -256,6 +256,13 @@ default_function_pro_epilogue (FILE *file ATTRIBUTE_UNUSED, { } +void +default_function_switched_text_sections (FILE *file ATTRIBUTE_UNUSED, + tree decl ATTRIBUTE_UNUSED, + bool new_is_cold ATTRIBUTE_UNUSED) +{ +} + /* Default target hook that outputs nothing to a stream. */ void no_asm_to_stream (FILE *file ATTRIBUTE_UNUSED) @@ -1841,6 +1848,9 @@ final_scan_insn (rtx insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED, debug_hooks->switch_text_section (); switch_to_section (current_function_section ()); + targetm.asm_out.function_switched_text_sections (asm_out_file, + current_function_decl, + in_cold_section_p); break; case NOTE_INSN_BASIC_BLOCK: |