This is the mail archive of the 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,

> gas/ChangeLog:
> 	* config/tc-arc.c (MAX_NUMBER_OF_ALIASES): Define.
> 	(struct cpu_type): Add aliases member, convert string points to
> 	NULL instead of 0.
> 	(cpu_types): Fill in the aliases field.
> 	(arc_handle_cpu_option_string): New function.
> 	(arc_option): Use arc_handle_cpu_option_string to process the
> 	option.
> 	(arc_show_cpu_list): New function.
> 	(md_show_usage): Call arc_show_cpu_list.  Convert help text to
> 	lower case to match all other help text.  Remove use of tabs,
> 	inline with global help text.

Approved - please apply.


> +  const char *alises [MAX_NUMBER_OF_ALIASES + 1];

You could set the this just [MAX_NUMBERR_OF_ALIASES] and then ...

> +          for (j = 0; cpu_types[i].alises[j] != NULL; ++j)

test for i < MAX_NUMBER_OF_ALIASES as well as a NULL alias.

Which would save a very small amount of space and is probably 
not worth it.  But it just struck me as odd that you would create
an array with MAX + 1 elements in it.


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