This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Add support for RISC-V Z-extension arch attributes.
- From: Jim Wilson <jimw at sifive dot com>
- To: Maxim Blinov <maxim dot blinov at embecosm dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Thu, 1 Aug 2019 16:49:28 -0700
- Subject: Re: [PATCH] Add support for RISC-V Z-extension arch attributes.
- References: <firstname.lastname@example.org>
On Mon, Jul 29, 2019 at 6:10 AM Maxim Blinov <email@example.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.