[PATCH 0/2] [PUSHED/OBV] gas/arc: Add nps400 support to .cpu directive

Andrew Burgess andrew.burgess@embecosm.com
Wed Apr 20 12:58:00 GMT 2016


* 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



More information about the Binutils mailing list