Support .largecomm with Solaris as (PR target/61821)
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. From-SVN: r235435
This commit is contained in:
parent
b2eb4ed5aa
commit
901f29c8c9
|
@ -1,3 +1,19 @@
|
|||
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
|
||||
|
|
|
@ -296,8 +296,8 @@ extern int ix86_decompose_address (rtx, struct ix86_address *);
|
|||
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 *,
|
||||
|
|
|
@ -6648,19 +6648,27 @@ x86_64_elf_unique_section (tree decl, int reloc)
|
|||
}
|
||||
|
||||
#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);
|
||||
|
|
|
@ -184,15 +184,15 @@ along with GCC; see the file COPYING3. If not see
|
|||
|
||||
/* 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)
|
||||
|
||||
|
@ -230,6 +230,10 @@ along with GCC; see the file COPYING3. If not see
|
|||
#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
|
||||
|
||||
|
|
|
@ -55,9 +55,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|||
#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. */
|
||||
|
||||
|
|
Loading…
Reference in New Issue