This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 0/2] [PUSHED/OBV] gas/arc: Add nps400 support to .cpu directive
- From: Andrew Burgess <andrew dot burgess at embecosm dot com>
- To: Claudiu Zissulescu <Claudiu dot Zissulescu at synopsys dot com>
- Cc: Nick Clifton <nickc at redhat dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Cupertino Miranda <Cupertino dot Miranda at synopsys dot com>
- Date: Wed, 20 Apr 2016 13:58:13 +0100
- Subject: Re: [PATCH 0/2] [PUSHED/OBV] gas/arc: Add nps400 support to .cpu directive
- Authentication-results: sourceware.org; auth=none
- References: <57174AF9 dot 2080603 at redhat dot com> <098ECE41A0A6114BB2A07F1EC238DE89661889E2 at de02wembxa dot internal dot synopsys dot com> <20160420112356 dot GJ6589 at embecosm dot com> <098ECE41A0A6114BB2A07F1EC238DE8966188A61 at de02wembxa dot internal dot synopsys dot com>
* Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com> [2016-04-20 12:00:58 +0000]:
>
> > I disagree and think it's a much worse idea. My concern was never
> > about memory usage, my concern is data duplication, how long until we
> > have a bug where one alias is configured slightly differently to
> > another alias
>
> This is one of the reason why macros have been introduced. For example:
> #define A7_CPU_TYPE(NAME) { #NAME, ARC_OPCODE_ARC700, bfd_mach_arc_arc700, E_ARC_MACH_ARC700, 0x00}
>
> Then you just enumerate it in the structure:
> A7_CPU_TYPE (ARC700),
> A7_CPU_TYPE (A7),
>
> So on, so forth...
>
> Attached is a patch that shows this concept, though it needs to be
> validated:
Feel free to move forward with your version this patch as you clearly
prefer this approach. You might want to consider if the help text is
clearer with all possible aliases listed, or if it is clearer to list
just a single name for each variant, clearly I favour the latter, but
I've been wrong before :)
Thanks,
Andrew