aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/darwin.c7
-rw-r--r--gcc/config/darwin.h8
-rw-r--r--gcc/config/sparc/sparc.c2
-rw-r--r--gcc/config/stormy16/stormy16.c2
-rw-r--r--gcc/config/xtensa/xtensa.c9
5 files changed, 21 insertions, 7 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 6a54738..e6f41a2 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1016,12 +1016,17 @@ machopic_select_section (tree exp, int reloc,
bool weak_p = DECL_P (exp) && DECL_WEAK (exp);
static void (* const base_funs[][2])(void) = {
{ text_section, text_coal_section },
- { text_unlikely_section, text_unlikely_coal_section },
+ { unlikely_text_section, text_unlikely_coal_section },
{ readonly_data_section, const_coal_section },
{ const_data_section, const_data_coal_section },
{ data_section, data_coal_section }
};
+ if (reloc == 0
+ && (last_text_section == in_text_unlikely
+ || last_text_section == in_text_unlikely_coal))
+ reloc = 1;
+
if (TREE_CODE (exp) == FUNCTION_DECL)
base_function = base_funs[reloc][weak_p];
else if (decl_readonly_section_1 (exp, reloc, MACHOPIC_INDIRECT))
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index b26715e..25d1bca 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -621,6 +621,10 @@ FUNCTION (void) \
if (asm_out_file) \
fputs ("\t" DIRECTIVE "\n", asm_out_file); \
in_section = SECTION; \
+ if ((SECTION == in_text_coal) \
+ || (SECTION == in_text_unlikely) \
+ || (SECTION == in_text_unlikely_coal)) \
+ last_text_section = SECTION; \
} \
} \
@@ -660,10 +664,6 @@ SECTION_FUNCTION (text_coal_section, \
in_text_coal, \
".section __TEXT,__textcoal_nt,coalesced," \
"pure_instructions", 0) \
-SECTION_FUNCTION (text_unlikely_section, \
- in_text_unlikely, \
- ".section __TEXT,__text_unlikely,coalesced," \
- "pure_instructions", 0) \
SECTION_FUNCTION (text_unlikely_coal_section, \
in_text_unlikely_coal, \
".section __TEXT,__text_unlikely_coal," \
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 6823915..340a377 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -8201,7 +8201,7 @@ sparc_output_deferred_case_vectors (void)
return;
/* Align to cache line in the function's code section. */
- function_section (current_function_decl);
+ current_function_section (current_function_decl);
align = floor_log2 (FUNCTION_BOUNDARY / BITS_PER_UNIT);
if (align > 0)
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index ec40cd9..a15051f 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -2074,7 +2074,7 @@ xstormy16_output_addr_vec (FILE *file, rtx label ATTRIBUTE_UNUSED, rtx table)
{
int vlen, idx;
- function_section (current_function_decl);
+ current_function_section (current_function_decl);
vlen = XVECLEN (table, 0);
for (idx = 0; idx < vlen; idx++)
diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
index cdba18c..b6084c9 100644
--- a/gcc/config/xtensa/xtensa.c
+++ b/gcc/config/xtensa/xtensa.c
@@ -1560,6 +1560,15 @@ override_options (void)
/* There's no need for -fPIC (as opposed to -fpic) on Xtensa. */
if (flag_pic > 1)
flag_pic = 1;
+
+ /* Hot/cold partitioning does not work on this architecture, because of
+ constant pools (the load instruction cannot necessarily reach that far).
+ Therefore disable it on this architecture. */
+ if (flag_reorder_blocks_and_partition)
+ {
+ flag_reorder_blocks_and_partition = 0;
+ flag_reorder_blocks = 1;
+ }
}