[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v4 10/30] Hexagon HVX (target/hexagon) instruction utility fu
From: |
Taylor Simpson |
Subject: |
RE: [PATCH v4 10/30] Hexagon HVX (target/hexagon) instruction utility functions |
Date: |
Fri, 29 Oct 2021 23:37:09 +0000 |
> -----Original Message-----
> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Friday, October 29, 2021 1:53 PM
> To: Taylor Simpson <tsimpson@quicinc.com>; qemu-devel@nongnu.org
> Cc: f4bug@amsat.org; ale@rev.ng; Brian Cain <bcain@quicinc.com>
> Subject: Re: [PATCH v4 10/30] Hexagon HVX (target/hexagon) instruction
> utility functions
>
> On 10/12/21 3:10 AM, Taylor Simpson wrote:
> > +void mem_vector_scatter_init(CPUHexagonState *env, int slot,
> > + target_ulong base_vaddr,
> > + int length, int element_size) {
> > + int i;
> > +
> > + for (i = 0; i < sizeof(MMVector); i++) {
> > + env->vtcm_log.data.ub[i] = 0;
> > + }
> > + bitmap_zero(env->vtcm_log.mask, MAX_VEC_SIZE_BYTES);
> > +
> > + env->vtcm_pending = true;
> > + env->vtcm_log.op = false;
> > + env->vtcm_log.op_size = 0;
> > + env->vtcm_log.size = sizeof(MMVector);
>
> Init really wants size != 0 here? Because it's not that way for gather...
The vtcm_log.size is only used during packet commit when there is a scatter.
It's not used for gather.
Since it's always sizeof(MMVector), I will remove it and replace all the uses
with the constant value.
Also, op and op_size are only used for scatter, so I'll remove the
initialization from mem_vector_gather_init.
>
> Otherwise it looks like you want
>
> memset(&env->vtcm_log, 0, sizeof(env->vtcm_log));
Actually, this initialization is not needed because the values will be
overwritten by the instruction. So, I'll remove it.
>
> Likewise memset of vtcm_log, with a second memset for tmp_Vregs[0].
Ditto.
Thanks a ton for the reviews! This is the last feedback to be addressed on
this series. I'll send v5 out tonight for your review.
Thanks,
Taylor
- Re: [PATCH v4 14/30] Hexagon HVX (target/hexagon) helper overrides for histogram instructions, (continued)
- [PATCH v4 18/30] Hexagon HVX (target/hexagon) helper overrides - vector max/min, Taylor Simpson, 2021/10/12
- [PATCH v4 11/30] Hexagon HVX (target/hexagon) helper functions, Taylor Simpson, 2021/10/12
- [PATCH v4 16/30] Hexagon HVX (target/hexagon) helper overrides - vector add & sub, Taylor Simpson, 2021/10/12
- [PATCH v4 13/30] Hexagon HVX (target/hexagon) helper overrides infrastructure, Taylor Simpson, 2021/10/12
- [PATCH v4 10/30] Hexagon HVX (target/hexagon) instruction utility functions, Taylor Simpson, 2021/10/12
- [PATCH v4 06/30] Hexagon HVX (target/hexagon) import macro definitions, Taylor Simpson, 2021/10/12
- [PATCH v4 07/30] Hexagon HVX (target/hexagon) semantics generator, Taylor Simpson, 2021/10/12
- [PATCH v4 22/30] Hexagon HVX (target/hexagon) helper overrides - vector loads, Taylor Simpson, 2021/10/12
- [PATCH v4 15/30] Hexagon HVX (target/hexagon) helper overrides - vector assign & cmov, Taylor Simpson, 2021/10/12
- [PATCH v4 19/30] Hexagon HVX (target/hexagon) helper overrides - vector logical ops, Taylor Simpson, 2021/10/12
- [PATCH v4 17/30] Hexagon HVX (target/hexagon) helper overrides - vector shifts, Taylor Simpson, 2021/10/12
- [PATCH v4 20/30] Hexagon HVX (target/hexagon) helper overrides - vector compares, Taylor Simpson, 2021/10/12
- [PATCH v4 08/30] Hexagon HVX (target/hexagon) semantics generator - part 2, Taylor Simpson, 2021/10/12
- [PATCH v4 30/30] Hexagon HVX (tests/tcg/hexagon) histogram test, Taylor Simpson, 2021/10/12