From: Evgeny Karpov <Evgeny.Karpov@microsoft.com>
To: Evgeny Karpov <Evgeny.Karpov@microsoft.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: "richard.sandiford@arm.com" <richard.sandiford@arm.com>,
"Richard Earnshaw (lists)" <Richard.Earnshaw@arm.com>,
Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>,
Radek Barton <radek.barton@microsoft.com>
Subject: [PATCH v1 1/6] Move mingw_* declarations to the mingw folder
Date: Thu, 18 Apr 2024 21:41:27 +0000 [thread overview]
Message-ID: <PR3PR83MB0425EC248695F5E0FB463DAEF80E2@PR3PR83MB0425.EURPRD83.prod.outlook.com> (raw)
In-Reply-To: <PR3PR83MB0425E5A9911AEB3716BEC140F80E2@PR3PR83MB0425.EURPRD83.prod.outlook.com>
This patch refactors recent changes to move mingw-related
functionality to the mingw folder. More renamings to the mingw_
prefix will be done in follow-up commits.
This is the first commit in the second patch series to add DLL
import/export implementation to AArch64.
Coauthors: Zac Walker <zacwalker@microsoft.com>,
Mark Harmstone <mark@harmstone.com> and
Ron Riddle <ron.riddle@microsoft.com>
Refactored, prepared, and validated by
Radek Barton <radek.barton@microsoft.com> and
Evgeny Karpov <evgeny.karpov@microsoft.com>
gcc/ChangeLog:
* config/aarch64/aarch64-protos.h
(mingw_pe_maybe_record_exported_symbol): Move mingw_*
declarations to mingw.
(mingw_pe_section_type_flags): Likewise.
(mingw_pe_unique_section): Likewise.
(mingw_pe_encode_section_info): Likewise.
* config/aarch64/cygming.h
(mingw_pe_asm_named_section): Likewise.
(mingw_pe_declare_function_type): Likewise.
* config/i386/i386-protos.h
(mingw_pe_unique_section): Likewise.
(mingw_pe_declare_function_type): Likewise.
(mingw_pe_maybe_record_exported_symbol): Likewise.
(mingw_pe_encode_section_info): Likewise.
(mingw_pe_section_type_flags): Likewise.
(mingw_pe_asm_named_section): Likewise.
* config/mingw/winnt.h: New file.
---
gcc/config/aarch64/aarch64-protos.h | 6 +-----
gcc/config/aarch64/cygming.h | 4 ----
gcc/config/i386/i386-protos.h | 8 ++------
gcc/config/mingw/winnt.h | 29 +++++++++++++++++++++++++++++
4 files changed, 32 insertions(+), 15 deletions(-)
create mode 100644 gcc/config/mingw/winnt.h
diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index 1d3f94c813e..95972556c56 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -24,6 +24,7 @@
#include "input.h"
#include "config/arm/aarch-common.h"
+#include "config/mingw/winnt.h"
/* SYMBOL_SMALL_ABSOLUTE: Generate symbol accesses through
high and lo relocs that calculate the base address using a PC
@@ -1110,11 +1111,6 @@ extern void aarch64_output_patchable_area (unsigned int, bool);
extern void aarch64_adjust_reg_alloc_order ();
-extern void mingw_pe_maybe_record_exported_symbol (tree, const char *, int);
-extern unsigned int mingw_pe_section_type_flags (tree, const char *, int);
-extern void mingw_pe_unique_section (tree, int);
-extern void mingw_pe_encode_section_info (tree, rtx, int);
-
bool aarch64_optimize_mode_switching (aarch64_mode_entity);
void aarch64_restore_za (rtx);
diff --git a/gcc/config/aarch64/cygming.h b/gcc/config/aarch64/cygming.h
index 2e7b01feb76..0d048879311 100644
--- a/gcc/config/aarch64/cygming.h
+++ b/gcc/config/aarch64/cygming.h
@@ -51,10 +51,6 @@ still needed for compilation. */
#include <stdio.h>
#endif
-extern void mingw_pe_asm_named_section (const char *, unsigned int, tree);
-extern void mingw_pe_declare_function_type (FILE *file, const char *name,
- int pub);
-
#define TARGET_ASM_NAMED_SECTION mingw_pe_asm_named_section
/* Select attributes for named sections. */
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index dbc861fb1ea..96368521380 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#include "config/mingw/winnt.h"
+
/* In i386-common.cc. */
extern bool ix86_handle_option (struct gcc_options *opts,
struct gcc_options *opts_set ATTRIBUTE_UNUSED,
@@ -295,16 +297,10 @@ extern void ix86_target_macros (void);
extern void ix86_register_pragmas (void);
/* In winnt.cc */
-extern void mingw_pe_unique_section (tree, int);
-extern void mingw_pe_declare_function_type (FILE *, const char *, int);
extern void i386_pe_record_external_function (tree, const char *);
-extern void mingw_pe_maybe_record_exported_symbol (tree, const char *, int);
-extern void mingw_pe_encode_section_info (tree, rtx, int);
extern bool i386_pe_binds_local_p (const_tree);
extern const char *i386_pe_strip_name_encoding_full (const char *);
extern bool i386_pe_valid_dllimport_attribute_p (const_tree);
-extern unsigned int mingw_pe_section_type_flags (tree, const char *, int);
-extern void mingw_pe_asm_named_section (const char *, unsigned int, tree);
extern void i386_pe_asm_output_aligned_decl_common (FILE *, tree,
const char *,
HOST_WIDE_INT,
diff --git a/gcc/config/mingw/winnt.h b/gcc/config/mingw/winnt.h
new file mode 100644
index 00000000000..da8445904ce
--- /dev/null
+++ b/gcc/config/mingw/winnt.h
@@ -0,0 +1,29 @@
+/* Subroutines for targets on Windows.
+Copyright (C) 2024 Free Software Foundation, Inc.
+
+GCC is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 3, or (at your option) any later
+version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+http://www.gnu.org/licenses/. */
+
+#ifndef GCC_MINGW_WINNT_H
+#define GCC_MINGW_WINNT_H
+
+extern void mingw_pe_asm_named_section (const char *, unsigned int, tree);
+extern void mingw_pe_declare_function_type (FILE *file, const char *name,
+ int pub);
+extern void mingw_pe_encode_section_info (tree, rtx, int);
+extern void mingw_pe_maybe_record_exported_symbol (tree, const char *, int);
+extern unsigned int mingw_pe_section_type_flags (tree, const char *, int);
+extern void mingw_pe_unique_section (tree, int);
+
+#endif
--
2.25.1
next prev parent reply other threads:[~2024-04-18 21:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 21:35 [PATCH v1 0/6] Add DLL import/export implementation to AArch64 Evgeny Karpov
2024-04-18 21:41 ` Evgeny Karpov [this message]
2024-04-18 21:43 ` [PATCH v1 2/6] Extract ix86 dllimport implementation to mingw Evgeny Karpov
2024-05-22 11:05 ` Richard Sandiford
2024-05-22 14:32 ` Evgeny Karpov
2024-05-23 8:35 ` Uros Bizjak
2024-05-23 8:41 ` Uros Bizjak
2024-05-23 17:53 ` Evgeny Karpov
2024-05-23 19:37 ` Uros Bizjak
2024-04-18 21:45 ` [PATCH v1 3/6] Rename functions for reuse in AArch64 Evgeny Karpov
2024-05-22 11:46 ` Richard Sandiford
2024-04-18 21:46 ` [PATCH v1 4/6] aarch64: Add selectany attribute handling Evgeny Karpov
2024-05-22 11:57 ` Richard Sandiford
2024-04-18 21:48 ` [PATCH v1 5/6] Adjust DLL import/export implementation for AArch64 Evgeny Karpov
2024-05-22 12:07 ` Richard Sandiford
2024-04-18 21:49 ` [PATCH v1 6/6] aarch64: Add DLL import/export to AArch64 target Evgeny Karpov
2024-06-04 20:10 ` [PATCH v1 0/6] Add DLL import/export implementation to AArch64 Evgeny Karpov
2024-06-05 6:01 ` Uros Bizjak
2024-06-05 23:41 ` Jonathan Yong
2024-06-06 9:23 ` Evgeny Karpov
2024-06-08 1:59 ` Jonathan Yong
2024-06-05 8:13 ` Richard Sandiford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=PR3PR83MB0425EC248695F5E0FB463DAEF80E2@PR3PR83MB0425.EURPRD83.prod.outlook.com \
--to=evgeny.karpov@microsoft.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=maxim.kuvyrkov@linaro.org \
--cc=radek.barton@microsoft.com \
--cc=richard.sandiford@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).