+2016-04-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/61821
+ * config/i386/i386.c (LARGECOMM_SECTION_ASM_OP): Define default.
+ (x86_elf_aligned_common): Rename to ...
+ (x86_elf_aligned_decl_common): ... this.
+ Add decl arg. Switch to .lbss for largecomm object. Use
+ LARGECOMM_SECTION_ASM_OP.
+ * config/i386/i386-protos.h (x86_elf_aligned_common): Reflect
+ renaming.
+ * config/i386/x86-64.h (ASM_OUTPUT_ALIGNED_COMMON): Rename to ...
+ (ASM_OUTPUT_ALIGNED_DECL_COMMON): ... this.
+ Pass new decl arg.
+ * config/i386/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Likewise.
+ [!USE_GAS] (LARGECOMM_SECTION_ASM_OP): Define.
+
2016-04-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/59407
extern int memory_address_length (rtx, bool);
extern void x86_output_aligned_bss (FILE *, tree, const char *,
unsigned HOST_WIDE_INT, int);
-extern void x86_elf_aligned_common (FILE *, const char *,
- unsigned HOST_WIDE_INT, int);
+extern void x86_elf_aligned_decl_common (FILE *, tree, const char *,
+ unsigned HOST_WIDE_INT, int);
#ifdef RTX_CODE
extern void ix86_fp_comparison_codes (enum rtx_code code, enum rtx_code *,
}
#ifdef COMMON_ASM_OP
+
+#ifndef LARGECOMM_SECTION_ASM_OP
+#define LARGECOMM_SECTION_ASM_OP "\t.largecomm\t"
+#endif
+
/* This says how to output assembler code to declare an
uninitialized external linkage data object.
- For medium model x86-64 we need to use .largecomm opcode for
+ For medium model x86-64 we need to use LARGECOMM_SECTION_ASM_OP opcode for
large objects. */
void
-x86_elf_aligned_common (FILE *file,
+x86_elf_aligned_decl_common (FILE *file, tree decl,
const char *name, unsigned HOST_WIDE_INT size,
int align)
{
if ((ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_MEDIUM_PIC)
&& size > (unsigned int)ix86_section_threshold)
- fputs ("\t.largecomm\t", file);
+ {
+ switch_to_section (get_named_section (decl, ".lbss", 0));
+ fputs (LARGECOMM_SECTION_ASM_OP, file);
+ }
else
fputs (COMMON_ASM_OP, file);
assemble_name (file, name);
/* As in sparc/sol2.h, override the default from i386/x86-64.h to work
around Sun as TLS bug. */
-#undef ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
+#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
+#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
do \
{ \
if (TARGET_SUN_TLS \
&& in_section \
&& ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \
switch_to_section (bss_section); \
- x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN); \
+ x86_elf_aligned_decl_common (FILE, DECL, NAME, SIZE, ALIGN); \
} \
while (0)
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors, \"aw\""
#endif
+#ifndef USE_GAS
+#define LARGECOMM_SECTION_ASM_OP "\t.lbcomm\t"
+#endif
+
#define USE_IX86_FRAME_POINTER 1
#define USE_X86_64_FRAME_POINTER 1
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
x86_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
-#undef ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
- x86_elf_aligned_common (FILE, NAME, SIZE, ALIGN);
+#undef ASM_OUTPUT_ALIGNED_DECL_COMMON
+#define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
+ x86_elf_aligned_decl_common (FILE, DECL, NAME, SIZE, ALIGN);
/* This is used to align code labels according to Intel recommendations. */