mirror of git://gcc.gnu.org/git/gcc.git
ia64.c (ia64_section_type_flags): Remove common_object attribute handling.
2012-03-30 Tristan Gingold <gingold@adacore.com> * config/ia64/ia64.c (ia64_section_type_flags): Remove common_object attribute handling. (SECTION_VMS_OVERLAY): Remove (ia64_vms_common_object_attribute): Replace abort with an assert. Do not set DECL_SECTION_NAME. (ia64_vms_output_aligned_decl_common): Handle common_object attribute. (ia64_vms_elf_asm_named_section): Remove. * config/ia64/vms.h (TARGET_ASM_NAMED_SECTION): Remove. From-SVN: r186010
This commit is contained in:
parent
5cc553023d
commit
fe5798c059
|
@ -1,3 +1,15 @@
|
||||||
|
2012-03-30 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
|
* config/ia64/ia64.c (ia64_section_type_flags): Remove
|
||||||
|
common_object attribute handling.
|
||||||
|
(SECTION_VMS_OVERLAY): Remove
|
||||||
|
(ia64_vms_common_object_attribute): Replace abort with an assert.
|
||||||
|
Do not set DECL_SECTION_NAME.
|
||||||
|
(ia64_vms_output_aligned_decl_common): Handle common_object
|
||||||
|
attribute.
|
||||||
|
(ia64_vms_elf_asm_named_section): Remove.
|
||||||
|
* config/ia64/vms.h (TARGET_ASM_NAMED_SECTION): Remove.
|
||||||
|
|
||||||
2012-03-30 Richard Guenther <rguenther@suse.de>
|
2012-03-30 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR middle-end/52786
|
PR middle-end/52786
|
||||||
|
|
|
@ -740,9 +740,6 @@ ia64_handle_model_attribute (tree *node, tree name, tree args,
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The section must have global and overlaid attributes. */
|
|
||||||
#define SECTION_VMS_OVERLAY SECTION_MACH_DEP
|
|
||||||
|
|
||||||
/* Part of the low level implementation of DEC Ada pragma Common_Object which
|
/* Part of the low level implementation of DEC Ada pragma Common_Object which
|
||||||
enables the shared use of variables stored in overlaid linker areas
|
enables the shared use of variables stored in overlaid linker areas
|
||||||
corresponding to the use of Fortran COMMON. */
|
corresponding to the use of Fortran COMMON. */
|
||||||
|
@ -753,24 +750,18 @@ ia64_vms_common_object_attribute (tree *node, tree name, tree args,
|
||||||
bool *no_add_attrs)
|
bool *no_add_attrs)
|
||||||
{
|
{
|
||||||
tree decl = *node;
|
tree decl = *node;
|
||||||
tree id, val;
|
tree id;
|
||||||
if (! DECL_P (decl))
|
|
||||||
abort ();
|
gcc_assert (DECL_P (decl));
|
||||||
|
|
||||||
DECL_COMMON (decl) = 1;
|
DECL_COMMON (decl) = 1;
|
||||||
id = TREE_VALUE (args);
|
id = TREE_VALUE (args);
|
||||||
if (TREE_CODE (id) == IDENTIFIER_NODE)
|
if (TREE_CODE (id) != IDENTIFIER_NODE && TREE_CODE (id) != STRING_CST)
|
||||||
val = build_string (IDENTIFIER_LENGTH (id), IDENTIFIER_POINTER (id));
|
|
||||||
else if (TREE_CODE (id) == STRING_CST)
|
|
||||||
val = id;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
warning (OPT_Wattributes,
|
error ("%qE attribute requires a string constant argument", name);
|
||||||
"%qE attribute requires a string constant argument", name);
|
|
||||||
*no_add_attrs = true;
|
*no_add_attrs = true;
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
}
|
}
|
||||||
DECL_SECTION_NAME (decl) = val;
|
|
||||||
return NULL_TREE;
|
return NULL_TREE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -783,50 +774,31 @@ ia64_vms_output_aligned_decl_common (FILE *file, tree decl, const char *name,
|
||||||
{
|
{
|
||||||
tree attr = DECL_ATTRIBUTES (decl);
|
tree attr = DECL_ATTRIBUTES (decl);
|
||||||
|
|
||||||
/* As common_object attribute set DECL_SECTION_NAME check it before
|
if (attr)
|
||||||
looking up the attribute. */
|
|
||||||
if (DECL_SECTION_NAME (decl) && attr)
|
|
||||||
attr = lookup_attribute ("common_object", attr);
|
attr = lookup_attribute ("common_object", attr);
|
||||||
|
if (attr)
|
||||||
|
{
|
||||||
|
tree id = TREE_VALUE (TREE_VALUE (attr));
|
||||||
|
const char *name;
|
||||||
|
|
||||||
|
if (TREE_CODE (id) == IDENTIFIER_NODE)
|
||||||
|
name = IDENTIFIER_POINTER (id);
|
||||||
|
else if (TREE_CODE (id) == STRING_CST)
|
||||||
|
name = TREE_STRING_POINTER (id);
|
||||||
else
|
else
|
||||||
attr = NULL_TREE;
|
|
||||||
|
|
||||||
if (!attr)
|
|
||||||
{
|
|
||||||
/* Code from elfos.h. */
|
|
||||||
fprintf (file, "%s", COMMON_ASM_OP);
|
|
||||||
assemble_name (file, name);
|
|
||||||
fprintf (file, ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",
|
|
||||||
size, align / BITS_PER_UNIT);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT));
|
|
||||||
ASM_OUTPUT_LABEL (file, name);
|
|
||||||
ASM_OUTPUT_SKIP (file, size ? size : 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Definition of TARGET_ASM_NAMED_SECTION for VMS. */
|
|
||||||
|
|
||||||
void
|
|
||||||
ia64_vms_elf_asm_named_section (const char *name, unsigned int flags,
|
|
||||||
tree decl)
|
|
||||||
{
|
|
||||||
if (!(flags & SECTION_VMS_OVERLAY))
|
|
||||||
{
|
|
||||||
default_elf_asm_named_section (name, flags, decl);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (flags != (SECTION_VMS_OVERLAY | SECTION_WRITE))
|
|
||||||
abort ();
|
abort ();
|
||||||
|
|
||||||
if (flags & SECTION_DECLARED)
|
fprintf (file, "\t.vms_common\t\"%s\",", name);
|
||||||
{
|
|
||||||
fprintf (asm_out_file, "\t.section\t%s\n", name);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
fprintf (file, "%s", COMMON_ASM_OP);
|
||||||
|
|
||||||
fprintf (asm_out_file, "\t.section\t%s,\"awgO\"\n", name);
|
/* Code from elfos.h. */
|
||||||
|
assemble_name (file, name);
|
||||||
|
fprintf (file, ","HOST_WIDE_INT_PRINT_UNSIGNED",%u",
|
||||||
|
size, align / BITS_PER_UNIT);
|
||||||
|
|
||||||
|
fputc ('\n', file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -10536,12 +10508,6 @@ ia64_section_type_flags (tree decl, const char *name, int reloc)
|
||||||
|| strncmp (name, ".gnu.linkonce.sb.", 17) == 0)
|
|| strncmp (name, ".gnu.linkonce.sb.", 17) == 0)
|
||||||
flags = SECTION_SMALL;
|
flags = SECTION_SMALL;
|
||||||
|
|
||||||
#if TARGET_ABI_OPEN_VMS
|
|
||||||
if (decl && DECL_ATTRIBUTES (decl)
|
|
||||||
&& lookup_attribute ("common_object", DECL_ATTRIBUTES (decl)))
|
|
||||||
flags |= SECTION_VMS_OVERLAY;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
flags |= default_section_type_flags (decl, name, reloc);
|
flags |= default_section_type_flags (decl, name, reloc);
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,9 +121,6 @@ STATIC func_ptr __CTOR_LIST__[1] \
|
||||||
#undef TARGET_VALID_POINTER_MODE
|
#undef TARGET_VALID_POINTER_MODE
|
||||||
#define TARGET_VALID_POINTER_MODE ia64_vms_valid_pointer_mode
|
#define TARGET_VALID_POINTER_MODE ia64_vms_valid_pointer_mode
|
||||||
|
|
||||||
#undef TARGET_ASM_NAMED_SECTION
|
|
||||||
#define TARGET_ASM_NAMED_SECTION ia64_vms_elf_asm_named_section
|
|
||||||
|
|
||||||
/* Define this macro if it is advisable to hold scalars in registers
|
/* Define this macro if it is advisable to hold scalars in registers
|
||||||
in a wider mode than that declared by the program. In such cases,
|
in a wider mode than that declared by the program. In such cases,
|
||||||
the value is constrained to be within the bounds of the declared
|
the value is constrained to be within the bounds of the declared
|
||||||
|
|
Loading…
Reference in New Issue