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] Add support for RISC-V Z-extension arch attributes.


On Mon, Jul 29, 2019 at 6:10 AM Maxim Blinov <maxim.blinov@embecosm.com> wrote:
> +#define RISCV_STD_Z_EXT_COUNT 12
> +extern const char * const z_ext_strtab[RISCV_STD_Z_EXT_COUNT];

I'd suggest defining the constant to a sizeof expression and not
specifying an array bound.  That eliminates a source of error if
someone adds a new z extension and forgets to update the constant.

I think this patch is basically correct.  It just needs some cleanup,
and we need some clarification on how exactly to sort the extensions.

Jim


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