This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]