Re: [PATCH v2 4/6] target/hexagon: add GVec overrides for HVX absolute difference
Richard Henderson <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
On 8/5/26 21:32, Brian Cain wrote:
> +#define fGEN_TCG_VEC_ABSDIFF(VECE, MAX_FN, MIN_FN) \
> + do { \
> + intptr_t tmpoff = offsetof(CPUHexagonState, vtmp); \
> + MAX_FN(VECE, tmpoff, VuV_off, VvV_off, \
> + VECTOR_SIZE_BYTE, VECTOR_SIZE_BYTE); \
> + MIN_FN(VECE, VdV_off, VuV_off, VvV_off, \
> + VECTOR_SIZE_BYTE, VECTOR_SIZE_BYTE); \
> + tcg_gen_gvec_sub(VECE, VdV_off, tmpoff, VdV_off, \
> + VECTOR_SIZE_BYTE, VECTOR_SIZE_BYTE); \
> + } while (0)
> +
TCG doesn't expect you to require temporaries like this, and provides for custom
expanders. Compare target/arm/tcg/gengvec.c, gen_gvec_sabd.
r~