Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse visibility attribute handling from ix86 #30

Merged
merged 6 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gcc/config/aarch64/cygming.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ do { \
#undef TARGET_ASM_LTO_END
#define TARGET_ASM_LTO_END mingw_pe_asm_lto_end

#undef TARGET_ASM_ASSEMBLE_VISIBILITY
#define TARGET_ASM_ASSEMBLE_VISIBILITY mingw_pe_assemble_visibility

/* According to Windows x64 software convention, the maximum stack allocatable
in the prologue is 4G - 8 bytes. Furthermore, there is a limited set of
instructions allowed to adjust the stack pointer in the epilog, forcing the
Expand Down
2 changes: 1 addition & 1 deletion gcc/config/i386/cygming.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ do { \
#define SUBTARGET_MANGLE_DECL_ASSEMBLER_NAME i386_pe_mangle_decl_assembler_name

#undef TARGET_ASM_ASSEMBLE_VISIBILITY
#define TARGET_ASM_ASSEMBLE_VISIBILITY i386_pe_assemble_visibility
#define TARGET_ASM_ASSEMBLE_VISIBILITY mingw_pe_assemble_visibility
eukarpov marked this conversation as resolved.
Show resolved Hide resolved

#undef SUB_TARGET_RECORD_STUB
#define SUB_TARGET_RECORD_STUB(NAME, DECL) mingw_pe_record_stub((NAME), 0)
Expand Down
1 change: 0 additions & 1 deletion gcc/config/i386/i386-protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ extern void i386_pe_asm_output_aligned_decl_common (FILE *, tree,
extern void i386_pe_start_function (FILE *, const char *, tree);
extern void i386_pe_end_function (FILE *, const char *, tree);
extern void i386_pe_end_cold_function (FILE *, const char *, tree);
extern void i386_pe_assemble_visibility (tree, int);
extern tree i386_pe_mangle_decl_assembler_name (tree, tree);
extern tree i386_pe_mangle_assembler_name (const char *);

Expand Down
2 changes: 1 addition & 1 deletion gcc/config/mingw/winnt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ i386_pe_maybe_mangle_decl_assembler_name (tree decl, tree id)
user-specified visibility attributes. */

void
i386_pe_assemble_visibility (tree decl, int)
mingw_pe_assemble_visibility (tree decl, int)
{
if (!decl
|| !lookup_attribute ("visibility", DECL_ATTRIBUTES (decl)))
Expand Down
1 change: 1 addition & 0 deletions gcc/config/mingw/winnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extern tree mingw_handle_selectany_attribute (tree *, tree, tree, int, bool *);
extern void mingw_pe_asm_named_section (const char *, unsigned int, tree);
extern void mingw_pe_asm_lto_start (void);
extern void mingw_pe_asm_lto_end (void);
extern void mingw_pe_assemble_visibility (tree, int);
extern void mingw_pe_declare_function_type (FILE *file, const char *name,
int pub);
extern void mingw_pe_encode_section_info (tree, rtx, int);
Expand Down