On 2/7/21 9:46 PM, Taylor Simpson wrote:
> +const RegField reg_field_info[] = {
> +#define DEF_REG_FIELD(TAG, START, WIDTH) \
> + { START, WIDTH },
> +#include "reg_fields_def.h.inc"
> + { 0, 0 }
> +#undef DEF_REG_FIELD
> +};
What is the purpose of the 0,0 entry? Surely you don't actually reference
reg_field_info[NUM_REG_FIELDS]?
You could also annotate the declaration and definition of reg_field_info with
the array size:
extern const RegField reg_field_info[NUM_REG_FIELDS];
Otherwise,
Reviewed-by: Richard Henderson <[email protected]>
r~