From 74a9301d6128c0c7a4a8570545b9db40505c93f2 Mon Sep 17 00:00:00 2001 From: Vladimir Mezentsev Date: Thu, 15 Mar 2018 08:55:04 +0000 Subject: [PATCH] re PR target/68256 (Defining TARGET_USE_CONSTANT_BLOCKS_P causes go bootstrap failure on aarch64.) 2018-03-15 Vladimir Mezentsev PR target/68256 * varasm.c (hash_section): Return an unchangeble hash value * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p): Return !aarch64_can_use_per_function_literal_pools_p (). From-SVN: r258553 --- gcc/ChangeLog | 7 +++++++ gcc/config/aarch64/aarch64.c | 8 +++----- gcc/varasm.c | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 07999ed4662..0d6855d9ec5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-03-15 Vladimir Mezentsev + + PR target/68256 + * varasm.c (hash_section): Return an unchangeble hash value + * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p): + Return !aarch64_can_use_per_function_literal_pools_p (). + 2018-03-15 Jakub Jelinek PR target/84860 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 07c55b132a7..4b5183b602b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -7733,11 +7733,9 @@ aarch64_can_use_per_function_literal_pools_p (void) static bool aarch64_use_blocks_for_constant_p (machine_mode, const_rtx) { - /* Fixme:: In an ideal world this would work similar - to the logic in aarch64_select_rtx_section but this - breaks bootstrap in gcc go. For now we workaround - this by returning false here. */ - return false; + /* We can't use blocks for constants when we're using a per-function + constant pool. */ + return !aarch64_can_use_per_function_literal_pools_p (); } /* Select appropriate section for constants depending diff --git a/gcc/varasm.c b/gcc/varasm.c index 6e345d39d31..2b5c70c8e57 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -225,7 +225,7 @@ hash_section (section *sect) { if (sect->common.flags & SECTION_NAMED) return htab_hash_string (sect->named.name); - return sect->common.flags; + return sect->common.flags & ~SECTION_DECLARED; } /* Helper routines for maintaining object_block_htab. */ -- 2.30.2