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 EE4413858C62 for ; Wed, 22 May 2024 11:57:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EE4413858C62 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 EE4413858C62 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=1716379073; cv=none; b=bP4tisBs8sJPCHSJ3sir/HB7hj0l6KWR0yUQEMSMRgW8FW6HRaFdl7zx0xIUGOuq7xE7tMk7SddR7clYChesNG7hjwnU5E+fiEIpnQ4HxK5/zbHw/180R/xQHeKvZ6CcBhP/CFxYjX3OXpsbfwLd5e5UUlJ2bym/czuYVfmpJAY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716379073; c=relaxed/simple; bh=vORUBVtXjro4J61s6/i65tnuhmdyI5Ru7vl4O5tGmJU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=kQo9aFGAPYfB23MfnGpxx69bR2jGZazNx9Qnxl+VJXcLr5FkNsWx/kUmpIpW91v5BimJLnwuVw2zGor+QgbcNFJcZxe08pKNwKAwnyQjKIeLtJBwI5642jkI7ZAIS5c+NRyGiHG6PHg/TUSujiraJOjV7hXl4aSOc/5l6hnuH/E= 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 95DE7339; Wed, 22 May 2024 04:58:14 -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 BCE4F3F641; Wed, 22 May 2024 04:57:49 -0700 (PDT) From: Richard Sandiford To: Evgeny Karpov Mail-Followup-To: Evgeny Karpov ,"gcc-patches\@gcc.gnu.org" , "Richard Earnshaw \(lists\)" , Maxim Kuvyrkov , Radek Barton , richard.sandiford@arm.com Cc: "gcc-patches\@gcc.gnu.org" , "Richard Earnshaw \(lists\)" , Maxim Kuvyrkov , Radek Barton Subject: Re: [PATCH v1 4/6] aarch64: Add selectany attribute handling References: Date: Wed, 22 May 2024 12:57:48 +0100 In-Reply-To: (Evgeny Karpov's message of "Thu, 18 Apr 2024 21:46:59 +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.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,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: > This patch extends the aarch64 attributes list with the selectany > attribute for the aarch64-w64-mingw32 target and reuses the mingw > implementation to handle it. > > * config/aarch64/aarch64.cc: > Extend the aarch64 attributes list. > * config/aarch64/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): > Define the selectany attribute. Now that TARGET_ATTRIBUTE_TABLE is an array, it should in principle be possible to define the attribute in winnt.cc and so avoid duplicating the table entry. That'd be a separate clean-up though. I agree that for this series we should stick with the current approach. So the patch is ok, thanks. Richard > --- > gcc/config/aarch64/aarch64.cc | 5 ++++- > gcc/config/aarch64/cygming.h | 3 +++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc > index c763a8a6298..19205927430 100644 > --- a/gcc/config/aarch64/aarch64.cc > +++ b/gcc/config/aarch64/aarch64.cc > @@ -855,7 +855,10 @@ static const attribute_spec aarch64_gnu_attributes[] = > NULL }, > { "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 } > + { "SVE sizeless type", 0, 0, false, true, false, true, NULL, NULL }, > +#ifdef SUBTARGET_ATTRIBUTE_TABLE > + SUBTARGET_ATTRIBUTE_TABLE > +#endif > }; > > static const scoped_attribute_specs aarch64_gnu_attribute_table = > diff --git a/gcc/config/aarch64/cygming.h b/gcc/config/aarch64/cygming.h > index 0d048879311..76623153080 100644 > --- a/gcc/config/aarch64/cygming.h > +++ b/gcc/config/aarch64/cygming.h > @@ -154,6 +154,9 @@ still needed for compilation. */ > flag_stack_check = STATIC_BUILTIN_STACK_CHECK; \ > } while (0) > > +#define SUBTARGET_ATTRIBUTE_TABLE \ > + { "selectany", 0, 0, true, false, false, false, \ > + mingw_handle_selectany_attribute, NULL } > > #define SUPPORTS_ONE_ONLY 1