* class.c (build_utf8_ref): Test for HAVE_GAS_SHF_MERGE value.
From-SVN: r71733
This commit is contained in:
parent
ff42324ea3
commit
eb9ec0d45d
2 changed files with 22 additions and 17 deletions
|
@ -1,3 +1,7 @@
|
|||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue