summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/varasm.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-21 18:47:00 +0000
committerpfg <pfg@FreeBSD.org>2013-12-21 18:47:00 +0000
commit68205669abdad29d13f7e6b34f483ac1298065ed (patch)
treeb0b89f0ab157d77eed267e3b82dd3ee8ed9e980b /contrib/gcc/varasm.c
parent8f82fe8c1f4a70975704e71ccca87132e0d9af6c (diff)
downloadFreeBSD-src-68205669abdad29d13f7e6b34f483ac1298065ed.zip
FreeBSD-src-68205669abdad29d13f7e6b34f483ac1298065ed.tar.gz
MFC r258017, r258429, r258748, r258817:
Merge updates from FSF pre4.3 GCC inspired on Apple's gcc: Updates to libiberty and mangling. New align attribute. Merge Apple updates to libstdc++.
Diffstat (limited to 'contrib/gcc/varasm.c')
-rw-r--r--contrib/gcc/varasm.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/contrib/gcc/varasm.c b/contrib/gcc/varasm.c
index 21b6904..ef3a83a 100644
--- a/contrib/gcc/varasm.c
+++ b/contrib/gcc/varasm.c
@@ -1383,7 +1383,7 @@ assemble_start_function (tree decl, const char *fnname)
if (flag_reorder_blocks_and_partition)
{
switch_to_section (unlikely_text_section ());
- assemble_align (FUNCTION_BOUNDARY);
+ assemble_align (DECL_ALIGN (decl));
ASM_OUTPUT_LABEL (asm_out_file, cfun->cold_section_label);
/* When the function starts with a cold section, we need to explicitly
@@ -1393,7 +1393,7 @@ assemble_start_function (tree decl, const char *fnname)
&& BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION)
{
switch_to_section (text_section);
- assemble_align (FUNCTION_BOUNDARY);
+ assemble_align (DECL_ALIGN (decl));
ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label);
hot_label_written = true;
first_function_block_is_cold = true;
@@ -1424,18 +1424,17 @@ assemble_start_function (tree decl, const char *fnname)
ASM_OUTPUT_LABEL (asm_out_file, cfun->hot_section_label);
/* Tell assembler to move to target machine's alignment for functions. */
- align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT);
- if (align < force_align_functions_log)
- align = force_align_functions_log;
+ align = floor_log2 (DECL_ALIGN (decl) / BITS_PER_UNIT);
if (align > 0)
{
ASM_OUTPUT_ALIGN (asm_out_file, align);
}
/* Handle a user-specified function alignment.
- Note that we still need to align to FUNCTION_BOUNDARY, as above,
+ Note that we still need to align to DECL_ALIGN, as above,
because ASM_OUTPUT_MAX_SKIP_ALIGN might not do any alignment at all. */
- if (align_functions_log > align
+ if (! DECL_USER_ALIGN (decl)
+ && align_functions_log > align
&& cfun->function_frequency != FUNCTION_FREQUENCY_UNLIKELY_EXECUTED)
{
#ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
OpenPOWER on IntegriCloud