[PATCH] Add support for RISC-V Z-extension arch attributes.
Jim Wilson
jimw@sifive.com
Thu Aug 1 23:49:00 GMT 2019
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
More information about the Binutils
mailing list