e2k: Fix vector ops with saturation.

An incorrect cast to an unsigned integer was used
instead of a signed integer.

Signed-off-by: Denis Drakhnya <numas13@gmail.com>
This commit is contained in:
Denis Drakhnia 2021-02-12 21:24:50 +02:00 committed by Denis Drakhnia
parent ab620f7a2b
commit 774f31dd0e
1 changed files with 6 additions and 6 deletions

View File

@ -117,15 +117,15 @@ GEN_HELPER_PACKED_CMP(pcmpgtd, sd, >)
dst.type[i] = map((cast) s1.type[i] op s2.type[i]); \
})
GEN_HELPER_PACKED_BINOP_MAP(paddsb, sb, +, int16_t, satsb)
GEN_HELPER_PACKED_BINOP_MAP(paddsh, sh, +, int32_t, satsh)
GEN_HELPER_PACKED_BINOP_MAP(paddusb, ub, +, uint16_t, satub)
GEN_HELPER_PACKED_BINOP_MAP(paddush, uh, +, uint32_t, satuh)
GEN_HELPER_PACKED_BINOP_MAP(paddsb, sb, +, int16_t, satsb)
GEN_HELPER_PACKED_BINOP_MAP(paddsh, sh, +, int32_t, satsh)
GEN_HELPER_PACKED_BINOP_MAP(paddusb, ub, +, int16_t, satub)
GEN_HELPER_PACKED_BINOP_MAP(paddush, uh, +, int32_t, satuh)
GEN_HELPER_PACKED_BINOP_MAP(psubsb, sb, -, int16_t, satsb)
GEN_HELPER_PACKED_BINOP_MAP(psubsh, sh, -, int32_t, satsh)
GEN_HELPER_PACKED_BINOP_MAP(psubusb, ub, -, uint16_t, satub)
GEN_HELPER_PACKED_BINOP_MAP(psubush, uh, -, uint32_t, satuh)
GEN_HELPER_PACKED_BINOP_MAP(psubusb, ub, -, int16_t, satub)
GEN_HELPER_PACKED_BINOP_MAP(psubush, uh, -, int32_t, satuh)
#define GEN_HELPER_PACKED_HORIZONTAL_OP(name, type, op, map) \
GEN_HELPER_PACKED_N(name, vec64_len(type) / 2, { \