qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 11/35] Hexagon (target/hexagon) register fields


From: Richard Henderson
Subject: Re: [PATCH v8 11/35] Hexagon (target/hexagon) register fields
Date: Sun, 14 Feb 2021 09:25:47 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

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 <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]