tm_file="${tm_file} mingw/mingw32.h"
tm_file="${tm_file} mingw/mingw-stdint.h"
tm_file="${tm_file} mingw/winnt.h"
+ tm_file="${tm_file} mingw/winnt-dll.h"
tmake_file="${tmake_file} aarch64/t-aarch64"
target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt.cc"
+ target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt-dll.cc"
extra_options="${extra_options} mingw/cygming.opt mingw/mingw.opt"
- extra_objs="${extra_objs} winnt.o"
+ extra_objs="${extra_objs} winnt.o winnt-dll.o"
c_target_objs="${c_target_objs} msformat-c.o"
d_target_objs="${d_target_objs} winnt-d.o"
tmake_file="${tmake_file} mingw/t-cygming"
{ "Advanced SIMD type", 1, 1, false, true, false, true, NULL, NULL },
{ "SVE type", 3, 3, false, true, false, true, NULL, NULL },
{ "SVE sizeless type", 0, 0, false, true, false, true, NULL, NULL },
+#if TARGET_DLLIMPORT_DECL_ATTRIBUTES
+ { "dllimport", 0, 0, false, false, false, false, handle_dll_attribute, NULL },
+ { "dllexport", 0, 0, false, false, false, false, handle_dll_attribute, NULL },
+#endif
#ifdef SUBTARGET_ATTRIBUTE_TABLE
SUBTARGET_ATTRIBUTE_TABLE
#endif
aarch64_load_symref_appropriately (rtx dest, rtx imm,
enum aarch64_symbol_type type)
{
+#if TARGET_PECOFF
+ rtx tmp = legitimize_pe_coff_symbol (imm, true);
+ if (tmp)
+ {
+ emit_insn (gen_rtx_SET (dest, tmp));
+ return;
+ }
+#endif
+
switch (type)
{
case SYMBOL_SMALL_ABSOLUTE:
gcc_assert (MEM_P (mem));
callee = XEXP (mem, 0);
+
+#if TARGET_PECOFF
+ tmp = legitimize_pe_coff_symbol (callee, false);
+ if (tmp)
+ callee = tmp;
+#endif
+
mode = GET_MODE (callee);
gcc_assert (mode == Pmode);
static rtx
aarch64_legitimize_address (rtx x, rtx /* orig_x */, machine_mode mode)
{
+#if TARGET_PECOFF
+ rtx tmp = legitimize_pe_coff_symbol (x, true);
+ if (tmp)
+ return tmp;
+#endif
+
/* Try to split X+CONST into Y=X+(CONST & ~mask), Y+(CONST&mask),
where mask is selected by alignment and size of the offset.
We try to pick as large a range for the offset as possible to
#define print_reg(rtx, code, file) (gcc_unreachable ())
-#define SYMBOL_FLAG_DLLIMPORT 0
-#define SYMBOL_FLAG_DLLEXPORT 0
+#define SYMBOL_FLAG_DLLIMPORT (SYMBOL_FLAG_MACH_DEP << 0)
+#define SYMBOL_REF_DLLIMPORT_P(X) \
+ ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_DLLIMPORT) != 0)
+#define SYMBOL_FLAG_DLLEXPORT (SYMBOL_FLAG_MACH_DEP << 1)
#define SYMBOL_REF_DLLEXPORT_P(X) \
((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_DLLEXPORT) != 0)
+#define SYMBOL_FLAG_STUBVAR (SYMBOL_FLAG_MACH_DEP << 2)
+#define SYMBOL_REF_STUBVAR_P(X) \
+ ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_STUBVAR) != 0)
+
/* Disable SEH and declare the required SEH-related macros that are
still needed for compilation. */
#undef TARGET_SEH
#define TARGET_ASM_UNIQUE_SECTION mingw_pe_unique_section
#define TARGET_ENCODE_SECTION_INFO mingw_pe_encode_section_info
+#define TARGET_VALID_DLLIMPORT_ATTRIBUTE_P mingw_pe_valid_dllimport_attribute_p
+
+/* Output function declarations at the end of the file. */
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END mingw_pe_file_end
+
/* Declare the type properly for any external libcall. */
#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
mingw_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)
{ "selectany", 0, 0, true, false, false, false, \
mingw_handle_selectany_attribute, NULL }
+#undef SUB_TARGET_RECORD_STUB
+#define SUB_TARGET_RECORD_STUB mingw_pe_record_stub
+
#define SUPPORTS_ONE_ONLY 1
/* Define this to be nonzero if static stack checking is supported. */
#undef MAX_OFILE_ALIGNMENT
#define MAX_OFILE_ALIGNMENT (8192 * 8)
+#undef GOT_ALIAS_SET
+#define GOT_ALIAS_SET mingw_GOT_alias_set ()
+
+#define PE_COFF_EXTERN_DECL_SHOULD_BE_LEGITIMIZED 1
+
+#define HAVE_64BIT_POINTERS 1
+
#endif