Commit eb9ec0d4 by Rainer Orth Committed by Rainer Orth

* class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.

From-SVN: r71733
parent ff42324e
2003-09-24 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
2003-09-23 Roger Sayle <roger@eyesopen.com> 2003-09-23 Roger Sayle <roger@eyesopen.com>
* jcf-write.c (generate_bytecode_insns): Optimize binary operations * jcf-write.c (generate_bytecode_insns): Optimize binary operations
......
...@@ -779,23 +779,24 @@ build_utf8_ref (tree name) ...@@ -779,23 +779,24 @@ build_utf8_ref (tree name)
TREE_READONLY (decl) = 1; TREE_READONLY (decl) = 1;
TREE_THIS_VOLATILE (decl) = 0; TREE_THIS_VOLATILE (decl) = 0;
DECL_INITIAL (decl) = cinit; DECL_INITIAL (decl) = cinit;
#ifdef HAVE_GAS_SHF_MERGE
{ if (HAVE_GAS_SHF_MERGE)
int decl_size; {
/* Ensure decl_size is a multiple of utf8const_type's alignment. */ int decl_size;
decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1) /* Ensure decl_size is a multiple of utf8const_type's alignment. */
& ~(TYPE_ALIGN_UNIT (utf8const_type) - 1); decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1)
if (flag_merge_constants && decl_size < 256) & ~(TYPE_ALIGN_UNIT (utf8const_type) - 1);
{ if (flag_merge_constants && decl_size < 256)
char buf[32]; {
int flags = (SECTION_OVERRIDE char buf[32];
| SECTION_MERGE | (SECTION_ENTSIZE & decl_size)); int flags = (SECTION_OVERRIDE
sprintf (buf, ".rodata.jutf8.%d", decl_size); | SECTION_MERGE | (SECTION_ENTSIZE & decl_size));
named_section_flags (buf, flags); sprintf (buf, ".rodata.jutf8.%d", decl_size);
DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf); named_section_flags (buf, flags);
} DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf);
} }
#endif }
TREE_CHAIN (decl) = utf8_decl_list; TREE_CHAIN (decl) = utf8_decl_list;
layout_decl (decl, 0); layout_decl (decl, 0);
pushdecl (decl); pushdecl (decl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment