From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 73F7639502D2 for ; Wed, 10 Apr 2024 18:34:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73F7639502D2 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 73F7639502D2 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712774108; cv=none; b=XXjo2igg46oEQZmp39STYBYL5YFZPjGHmCxAKktUiJnLX+09WHMkWkQ/D8dCy6aVvR5M0nOH3naP3CEZAInC7H1absvnkh59q1TjPPJmm5PF5CuIGERbN4zisCIfHUwgCmxJ6H3GeQ6WV2JEzfvRZ85HC/MORd6kPjlerhE9AAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712774108; c=relaxed/simple; bh=uLs6VGfyD35aN+4XcxVNKQjk2Oe9xM/IAw1oT4dh7KY=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=r3ru5qnlUXYm2/VcGzkA9Q7/sURgjF91KjBJGI9H62rfF4YVL42jEiNsK8WWq2x9YgCL2+7MOGFbOTuv/H5hvXyB304yfCz6Tayfr+GRAc8QmwBh7Klq2USqZXiUT9avvya1fmVGl2KbMydqBRkIGmN4qbjiZzhDqohsgYmg3xA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C6872139F; Wed, 10 Apr 2024 11:35:25 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 21CAB3F6C4; Wed, 10 Apr 2024 11:34:55 -0700 (PDT) From: Richard Sandiford To: Evgeny Karpov Mail-Followup-To: Evgeny Karpov ,"gcc-patches\@gcc.gnu.org" , "Richard Earnshaw \(lists\)" , "Andrew Pinski \(QUIC\)" , Maxim Kuvyrkov , Radek Barton , richard.sandiford@arm.com Cc: "gcc-patches\@gcc.gnu.org" , "Richard Earnshaw \(lists\)" , "Andrew Pinski \(QUIC\)" , Maxim Kuvyrkov , Radek Barton Subject: Re: [PATCH v2 08/13] aarch64: Add Cygwin and MinGW environments for AArch64 References: Date: Wed, 10 Apr 2024 19:34:53 +0100 In-Reply-To: (Evgeny Karpov's message of "Mon, 4 Mar 2024 17:44:21 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-19.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,KAM_SHORT,KAM_STOCKGEN,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Evgeny Karpov writes: > From: Zac Walker > Date: Fri, 1 Mar 2024 10:49:28 +0100 > Subject: [PATCH v2 08/13] aarch64: Add Cygwin and MinGW environments for > AArch64 > > Define Cygwin and MinGW environment such as types, SEH definitions, > shared libraries, etc. > > gcc/ChangeLog: > > * config.gcc: Add Cygwin and MinGW difinitions. > * config/aarch64/aarch64-protos.h > (mingw_pe_maybe_record_exported_symbol): Declare functions > which are used in Cygwin and MinGW environment. > (mingw_pe_section_type_flags): Likewise. > (mingw_pe_unique_section): Likewise. > (mingw_pe_encode_section_info): Likewise. > * config/aarch64/cygming.h: New file. > --- > gcc/config.gcc | 4 + > gcc/config/aarch64/aarch64-protos.h | 5 + > gcc/config/aarch64/cygming.h | 175 ++++++++++++++++++++++++++++ > 3 files changed, 184 insertions(+) > create mode 100644 gcc/config/aarch64/cygming.h > > diff --git a/gcc/config.gcc b/gcc/config.gcc > index 3aca257c322..4471599454b 100644 > --- a/gcc/config.gcc > +++ b/gcc/config.gcc > @@ -1267,7 +1267,11 @@ aarch64*-*-linux*) > aarch64-*-mingw*) > tm_file="${tm_file} aarch64/aarch64-abi-ms.h" > tm_file="${tm_file} aarch64/aarch64-coff.h" > + tm_file="${tm_file} aarch64/cygming.h" > + tm_file="${tm_file} mingw/mingw32.h" > + tm_file="${tm_file} mingw/mingw-stdint.h" > tmake_file="${tmake_file} aarch64/t-aarch64" > + target_gtfiles="$target_gtfiles \$(srcdir)/config/mingw/winnt.cc" > case ${enable_threads} in > "" | yes | win32) > thread_file='win32' > diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h > index bd719b992a5..759e1a0f9da 100644 > --- a/gcc/config/aarch64/aarch64-protos.h > +++ b/gcc/config/aarch64/aarch64-protos.h > @@ -1110,6 +1110,11 @@ 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 > new file mode 100644 > index 00000000000..2f239c42a89 > --- /dev/null > +++ b/gcc/config/aarch64/cygming.h > @@ -0,0 +1,175 @@ > +/* Operating system specific defines to be used when targeting GCC for > + hosting on Windows32, using a Unix style C library and tools. > + Copyright (C) 1995-2024 Free Software Foundation, Inc. > + > +This file is part of GCC. > + > +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 > +. */ > + > +#ifndef GCC_AARCH64_CYGMING_H > +#define GCC_AARCH64_CYGMING_H > + > +#undef PREFERRED_DEBUGGING_TYPE > +#define PREFERRED_DEBUGGING_TYPE DINFO_TYPE_NONE > + > +#define FASTCALL_PREFIX '@' > + > +#define print_reg(rtx, code, file) How about: #define print_reg(rtx, code, file) (gcc_unreachable ()) so that attempts to use this are a noisy runtime failure? > +#define SYMBOL_FLAG_DLLIMPORT 0 > +#define SYMBOL_FLAG_DLLEXPORT 0 > + > +#define SYMBOL_REF_DLLEXPORT_P(X) \ > + ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_DLLEXPORT) != 0) > + > +/* Disable SEH and declare the required SEH-related macros that are > +still needed for compilation. */ > +#undef TARGET_SEH > +#define TARGET_SEH 0 > + > +#define SSE_REGNO_P(N) 0 > +#define GENERAL_REGNO_P(N) 0 > +#define SEH_MAX_FRAME_SIZE 0 Similarly here, how about: #define SSE_REGNO_P(N) (gcc_unreachable (), 0) #define GENERAL_REGNO_P(N) (gcc_unreachable (), 0) #define SEH_MAX_FRAME_SIZE (gcc_unreachable (), 0) Thanks, Richard