Re: [RFC PATCH 09/43] target/loongarch: Implement vhaddw/vhsubw

2022-12-24 Thread Richard Henderson
On 12/24/22 00:15, Song Gao wrote: +#define S_EVEN(a, bit) \ +int64_t)(a)) << (64 - bit / 2)) >> (64 - bit / 2)) + +#define U_EVEN(a, bit) \ +uint64_t)(a)) << (64 - bit / 2)) >> (64 - bit / 2)) + +#define S_ODD(a, bit) \ +int64_t)(a)) << (64 - bit)) >> (64 - bi

[RFC PATCH 09/43] target/loongarch: Implement vhaddw/vhsubw

2022-12-24 Thread Song Gao
This patch includes: - VHADDW.{H.B/W.H/D.W/Q.D/HU.BU/WU.HU/DU.WU/QU.DU}; - VHSUBW.{H.B/W.H/D.W/Q.D/HU.BU/WU.HU/DU.WU/QU.DU}. Signed-off-by: Song Gao --- target/loongarch/disas.c| 17 +++ target/loongarch/helper.h | 17 +++ target/loongarch/insn_trans/trans