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>
* jcf-write.c (generate_bytecode_insns): Optimize binary operations
......
......@@ -779,23 +779,24 @@ build_utf8_ref (tree name)
TREE_READONLY (decl) = 1;
TREE_THIS_VOLATILE (decl) = 0;
DECL_INITIAL (decl) = cinit;
#ifdef HAVE_GAS_SHF_MERGE
{
int decl_size;
/* Ensure decl_size is a multiple of utf8const_type's alignment. */
decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1)
& ~(TYPE_ALIGN_UNIT (utf8const_type) - 1);
if (flag_merge_constants && decl_size < 256)
{
char buf[32];
int flags = (SECTION_OVERRIDE
| SECTION_MERGE | (SECTION_ENTSIZE & decl_size));
sprintf (buf, ".rodata.jutf8.%d", decl_size);
named_section_flags (buf, flags);
DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf);
}
}
#endif
if (HAVE_GAS_SHF_MERGE)
{
int decl_size;
/* Ensure decl_size is a multiple of utf8const_type's alignment. */
decl_size = (name_len + 5 + TYPE_ALIGN_UNIT (utf8const_type) - 1)
& ~(TYPE_ALIGN_UNIT (utf8const_type) - 1);
if (flag_merge_constants && decl_size < 256)
{
char buf[32];
int flags = (SECTION_OVERRIDE
| SECTION_MERGE | (SECTION_ENTSIZE & decl_size));
sprintf (buf, ".rodata.jutf8.%d", decl_size);
named_section_flags (buf, flags);
DECL_SECTION_NAME (decl) = build_string (strlen (buf), buf);
}
}
TREE_CHAIN (decl) = utf8_decl_list;
layout_decl (decl, 0);
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