summaryrefslogtreecommitdiff
path: root/gcc/target-def.h
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-02 19:32:52 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-02 19:32:52 +0000
commit102e39958a6873d493d1f1f11b23b7992aa7af78 (patch)
tree528d89d3defd10c4dc529d8c5dd944f7010598a6 /gcc/target-def.h
parent2a1990e9c656063ab626fab258ae2d418378c76d (diff)
downloadgcc-102e39958a6873d493d1f1f11b23b7992aa7af78.tar.gz
* doc/tm.texi (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Document.
(ASM_OUTPUT_BSS): Describe the two ways of handling global BSS, and say that only one is needed. * doc/rtl.texi (SYMBOL_REF_BLOCK): Say that the block can be null. * target.h (have_switchable_bss_sections): New hook. * explow.c (use_anchored_address): Check that the symbol is in a block. * varasm.c (tls_comm_section, comm_section, lcomm_section) (bss_noswitch_section): New variables. (get_unnamed_section): Add SECTION_UNNAMED to the flags. (get_noswitch_section): New function. (get_block_for_section): Allow SECT to be null. (unlikely_text_section_p): Use SECTION_STYLE. (bss_initializer_p): New function. (get_variable_section): Move earlier in file. Take a new argument, prefer_noswitch_p. Move bss checks from assemble_variable to here. Return one of the new *_sections in such cases. (get_block_for_decl): New function, extracting some logic from use_blocks_for_decl_p. (change_symbol_section): Remove in favor of... (change_symbol_block): ...this new function. (use_blocks_for_decl_p): Remove checks now performed by get_block_for_decl. (make_decl_rtl): Use change_symbol_block and get_block_for_decl. (ASM_EMIT_LOCAL, ASM_EMIT_BSS, ASM_EMIT_COMMON): Delete in favor of... (emit_local, emit_bss, emit_common): ...these new functions. Return true if the alignment was honored. (emit_tls_common): New function. (asm_emit_uninitialised): Delete. (assemble_variable_noswitch): New function, split out from... (assemble_variable): ...here. Don't make decisions about common variables here. Globalize all public decls that go into non-common sections. Check whether SYMBOL_REF_BLOCK is null. (output_constant_def_contents): Check whether SYMBOL_REF_BLOCK is null. (output_constant_pool): Likewise. (init_varasm_once): Initialize the new section variables. (have_global_bss_p): New function. (categorize_decl_for_section): Use bss_initializer_p. (switch_to_section): Use SECTION_STYLE. Abort for SECTION_NOSWITCH. (place_block_symbol): Assert that the symbol must be in a block. * target-def.h (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): New macro. (TARGET_INITIALIZER): Include it. * rtl.h (SYMBOL_REF_BLOCK): Document the null alternative. * output.h (SECTION_STYLE_MASK, SECTION_COMMON): New macros. (SECTION_MACH_DEP): Bump by two. (SECTION_UNNAMED, SECTION_NOSWITCH): New macros. (unnamed_section): Mention SECTION_UNNAMED in comment. (named_section): Likewise SECTION_NAMED. (noswitch_section_callback): New type. (noswitch_section): New structure. (section): Add a noswitch_section alternative. (SECTION_STYLE): New macro. (tls_comm_section, comm_section, lcomm_section): Declare. (bss_noswitch_section, have_global_bss_p): Declare. * config/elfos.h (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Override. * config/iq2000/iq2000.c (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Override. * config/v850/v850.c (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Override. * config/stormy16/stormy16.c (TARGET_HAVE_SWITCHABLE_BSS_SECTIONS): Override. cp/ * decl.c (start_decl): Use have_global_bss_p when deciding whether to make the decl common. ada/ * utils.c (create_var_decl): Use have_global_bss_p when deciding whether to make the decl common. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111644 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target-def.h')
-rw-r--r--gcc/target-def.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/target-def.h b/gcc/target-def.h
index c29256712f9..fa38166769c 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -140,6 +140,10 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# endif
#endif
+#ifndef TARGET_HAVE_SWITCHABLE_BSS_SECTIONS
+#define TARGET_HAVE_SWITCHABLE_BSS_SECTIONS false
+#endif
+
#ifndef TARGET_ASM_INIT_SECTIONS
#define TARGET_ASM_INIT_SECTIONS hook_void_void
#endif
@@ -651,6 +655,7 @@ Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
TARGET_EXTRA_LIVE_ON_ENTRY, \
TARGET_UNWIND_TABLES_DEFAULT, \
TARGET_HAVE_NAMED_SECTIONS, \
+ TARGET_HAVE_SWITCHABLE_BSS_SECTIONS, \
TARGET_HAVE_CTORS_DTORS, \
TARGET_HAVE_TLS, \
TARGET_HAVE_SRODATA_SECTION, \