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

Claudiu Zissulescu Claudiu.Zissulescu@synopsys.com
Wed Apr 20 09:07:00 GMT 2016
Hi Andrew,

> +/* Maximum number of CPU aliases in the cpu_type table.  */
> +#define MAX_NUMBER_OF_ALIASES 2
> +
>  /* A table of CPU names and opcode sets.  */
>  static const struct cpu_type
>  {
>    const char *name;
> +  const char *alises [MAX_NUMBER_OF_ALIASES + 1];

Instead of this list of aliases, I would list all the alternatives in cpu_types[]. On the expense of more used memory, we will get rid of the MAX_NUMBER _OF_ALIASES and the need to maintain it whenever we want to add a new cpu alias.  Also the support routines will look much cleaner, we will have a single scanning loop instead of two. Please take it as recommendation. Regardless the decision you take, the patch seems  alright to me.

Best,
Claudiu



More information about the Binutils mailing list