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 B360F3870C11 for ; Wed, 10 Apr 2024 18:17:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B360F3870C11 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 B360F3870C11 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=1712773080; cv=none; b=wLbkoKwcsNfm3cefbwcaSv/gUJr2trTe3kbBNUFypGvBpSrflQCH/EsJdViVK6kAt2mLSXvOFp+4SODzJTO/fup5uZlHtHLvTrPysqCDE4HdVeXlpDQUaNPKF9iSb9Oe4fLmEXOxOHADv0MVeRDD7BkjUTtF/RJja4oC9/v0YIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1712773080; c=relaxed/simple; bh=6XIAwNgUqZqvHbXAV57zaZt3TdA5Lg8F9NCQG07Z/8I=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=nTpA3dlfEQrNZ27O7E+rxdnEMNKFY22/8FhdBUgltD4HRnx3hul0ZiKXnm/Bn+mhAbJbZuDgednby2/nV04eCn+KD+bTgzhQmAHSJE7rzhDHEYNYJow9lQ2ZzVkjrSAIvlDFEt95HXQGoDu0bHCyQaesusOvpmMvsAaJCZER1a0= 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 77EDC139F; Wed, 10 Apr 2024 11:18:18 -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 B9F703F6C4; Wed, 10 Apr 2024 11:17:47 -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 02/13] aarch64: The aarch64-w64-mingw32 target implements References: Date: Wed, 10 Apr 2024 19:17:46 +0100 In-Reply-To: (Evgeny Karpov's message of "Mon, 4 Mar 2024 17:33:43 +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=-20.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,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: Sorry for the slow reply. Evgeny Karpov writes: > From: Zac Walker > Date: Fri, 1 Mar 2024 01:45:13 +0100 > Subject: [PATCH v2 02/13] aarch64: The aarch64-w64-mingw32 target implements > the MS ABI > > Two ABIs for aarch64 have been defined for different platforms. > > gcc/ChangeLog: > > * config/aarch64/aarch64-opts.h (enum aarch64_calling_abi): > Define two ABIs. > --- > gcc/config/aarch64/aarch64-opts.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/gcc/config/aarch64/aarch64-opts.h b/gcc/config/aarch64/aarch64-opts.h > index a05c0d3ded1..52c9e4596d6 100644 > --- a/gcc/config/aarch64/aarch64-opts.h > +++ b/gcc/config/aarch64/aarch64-opts.h > @@ -131,4 +131,11 @@ enum aarch64_early_ra_scope { > AARCH64_EARLY_RA_NONE > }; > > +/* Available call ABIs. */ > +enum aarch64_calling_abi > +{ > + AARCH64_CALLING_ABI_EABI, > + AARCH64_CALLING_ABI_MS > +}; > + > #endif Thanks for removing the MS_ABI uses. However, I'm still a bit uneasy about this. We already have a way of categorising ABIs (arm_pcs) and it's not clear how this new enum would interact with it. We also have infrastructure for recording the arm_pcs for each call, including in RTL insns. Would we need to do the same for this classification? It seems like the enum is currently unused. At least, I was able to build successfully with: diff --git a/gcc/config/aarch64/aarch64-opts.h b/gcc/config/aarch64/aarch64-opts.h index 52c9e4596d6..a05c0d3ded1 100644 --- a/gcc/config/aarch64/aarch64-opts.h +++ b/gcc/config/aarch64/aarch64-opts.h @@ -131,11 +131,4 @@ enum aarch64_early_ra_scope { AARCH64_EARLY_RA_NONE }; -/* Available call ABIs. */ -enum aarch64_calling_abi -{ - AARCH64_CALLING_ABI_EABI, - AARCH64_CALLING_ABI_MS -}; - #endif diff --git a/gcc/config/aarch64/cygming.h b/gcc/config/aarch64/cygming.h index 2f239c42a89..902539763bd 100644 --- a/gcc/config/aarch64/cygming.h +++ b/gcc/config/aarch64/cygming.h @@ -43,9 +43,6 @@ still needed for compilation. */ #define GENERAL_REGNO_P(N) 0 #define SEH_MAX_FRAME_SIZE 0 -#undef DEFAULT_ABI -#define DEFAULT_ABI AARCH64_CALLING_ABI_MS - #undef TARGET_PECOFF #define TARGET_PECOFF 1 diff --git a/gcc/config/mingw/mingw32.h b/gcc/config/mingw/mingw32.h index 040c3e1e521..08f1b5f0696 100644 --- a/gcc/config/mingw/mingw32.h +++ b/gcc/config/mingw/mingw32.h @@ -19,9 +19,7 @@ along with GCC; see the file COPYING3. If not see . */ #undef DEFAULT_ABI -#if defined (TARGET_AARCH64_MS_ABI) -# define DEFAULT_ABI AARCH64_CALLING_ABI_MS -#else +#if !defined (TARGET_AARCH64_MS_ABI) # define DEFAULT_ABI MS_ABI #endif Would you be happy with that for now? We can then revisit this later when the information is needed. Thanks, Richard