David
* varasm.c (assemble_start_function): Only emit hot_section_label
if reorder_blocks_and_partition is enabled.
(assemble_end_function): Only emit cold_section_end_label and
hot_section_end_label if reorder_blocks_and_partition is enabled.
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.492
diff -c -p -r1.492 varasm.c
*** varasm.c 1 Apr 2005 03:42:45 -0000 1.492
--- varasm.c 1 Apr 2005 16:37:59 -0000
*************** assemble_start_function (tree decl, cons
*** 1303,1309 ****
/* Switch to the correct text section for the start of the
function. */
function_section (decl);
! if (!hot_label_written)
ASM_OUTPUT_LABEL (asm_out_file, hot_section_label);
/* Tell assembler to move to target machine's alignment for
functions. */
--- 1303,1309 ----
/* Switch to the correct text section for the start of the
function. */
function_section (decl);
! if (flag_reorder_blocks_and_partition && !hot_label_written)
ASM_OUTPUT_LABEL (asm_out_file, hot_section_label);
/* Tell assembler to move to target machine's alignment for
functions. */
*************** assemble_end_function (tree decl, const
*** 1379,1387 ****
debug info.) */
save_text_section = in_section;
unlikely_text_section ();
! ASM_OUTPUT_LABEL (asm_out_file, cold_section_end_label);
text_section ();
! ASM_OUTPUT_LABEL (asm_out_file, hot_section_end_label);
if (save_text_section == in_unlikely_executed_text)
unlikely_text_section ();
}
--- 1379,1389 ----
debug info.) */
save_text_section = in_section;
unlikely_text_section ();
! if (flag_reorder_blocks_and_partition)
! ASM_OUTPUT_LABEL (asm_out_file, cold_section_end_label);
text_section ();
! if (flag_reorder_blocks_and_partition)
! ASM_OUTPUT_LABEL (asm_out_file, hot_section_end_label);
if (save_text_section == in_unlikely_executed_text)
unlikely_text_section ();
}