[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [RFC PATCH v3 11/34] Hexagon (target/hexagon) register fields
From: |
Taylor Simpson |
Subject: |
RE: [RFC PATCH v3 11/34] Hexagon (target/hexagon) register fields |
Date: |
Wed, 26 Aug 2020 23:52:16 +0000 |
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Wednesday, August 26, 2020 8:30 AM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: philmd@redhat.com; laurent@vivier.eu; riku.voipio@iki.fi;
> aleksandar.m.mail@gmail.com; ale@rev.ng
> Subject: Re: [RFC PATCH v3 11/34] Hexagon (target/hexagon) register fields
>
> > +#define NUM_GEN_REGS 32
>
> What's this? It doesn't appear to be field related.
Not needed, will remove it.
> > +extern reg_field_t reg_field_info[];
>
> const.
OK
> > +enum reg_fields_enum {
>
> Doesn't follow naming guidelines. But you don't actually use the name at all,
> so better to just drop the name entirely?
OK
> > +/* USR fields */
> > +DEF_REG_FIELD(USR_OVF,
> > + "ovf", 0, 1,
> > + "Sticky Saturation Overflow - "
> > + "Set when saturation occurs while executing instruction that specifies
> > "
> > + "optional saturation, remains set until explicitly cleared by a USR=Rs
> > "
> > + "instruction.")
>
> Is the description as a string really useful, or even used?
> A comment would seem to do just as well, not consume space in the final
> binary,
> and even then seems redundant with the actual architecture manual.
I thought they help make the code more readable. You are right that they
shouldn't take space in the binary.
I can either change so they don't go into the binary or remove them altogether
- guess I'll remove them altogether.
- Re: [RFC PATCH v3 01/34] Hexagon Update MAINTAINERS file, (continued)
- [RFC PATCH v3 15/34] Hexagon (target/hexagon) instruction printing, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 05/34] Hexagon (target/hexagon) register names, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 06/34] Hexagon (disas) disassembler, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 11/34] Hexagon (target/hexagon) register fields, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 02/34] Hexagon (target/hexagon) README, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 03/34] Hexagon (include/elf.h) ELF machine definition, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 13/34] Hexagon (target/hexagon) register map, Taylor Simpson, 2020/08/18
- [RFC PATCH v3 14/34] Hexagon (target/hexagon) instruction/packet decode, Taylor Simpson, 2020/08/18