target/arm: Implement MVE VQRSHL
Implement the MV VQRSHL (vector) insn. Again, the code to perform the actual shifts is borrowed from neon_helper.c. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210617121628.20116-34-peter.maydell@linaro.org
This commit is contained in:
parent
483da66139
commit
9dc868c41d
@ -177,6 +177,14 @@ DEF_HELPER_FLAGS_4(mve_vqshlub, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
DEF_HELPER_FLAGS_4(mve_vqshluh, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
DEF_HELPER_FLAGS_4(mve_vqshluw, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
|
||||
DEF_HELPER_FLAGS_4(mve_vqrshlsb, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
DEF_HELPER_FLAGS_4(mve_vqrshlsh, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
DEF_HELPER_FLAGS_4(mve_vqrshlsw, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
|
||||
DEF_HELPER_FLAGS_4(mve_vqrshlub, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
DEF_HELPER_FLAGS_4(mve_vqrshluh, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
DEF_HELPER_FLAGS_4(mve_vqrshluw, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr)
|
||||
|
||||
DEF_HELPER_FLAGS_4(mve_vadd_scalarb, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(mve_vadd_scalarh, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)
|
||||
DEF_HELPER_FLAGS_4(mve_vadd_scalarw, TCG_CALL_NO_WG, void, env, ptr, ptr, i32)
|
||||
|
@ -133,6 +133,9 @@ VQSUB_U 111 1 1111 0 . .. ... 0 ... 0 0010 . 1 . 1 ... 0 @2op
|
||||
VQSHL_S 111 0 1111 0 . .. ... 0 ... 0 0100 . 1 . 1 ... 0 @2op_rev
|
||||
VQSHL_U 111 1 1111 0 . .. ... 0 ... 0 0100 . 1 . 1 ... 0 @2op_rev
|
||||
|
||||
VQRSHL_S 111 0 1111 0 . .. ... 0 ... 0 0101 . 1 . 1 ... 0 @2op_rev
|
||||
VQRSHL_U 111 1 1111 0 . .. ... 0 ... 0 0101 . 1 . 1 ... 0 @2op_rev
|
||||
|
||||
# Vector miscellaneous
|
||||
|
||||
VCLS 1111 1111 1 . 11 .. 00 ... 0 0100 01 . 0 ... 0 @1op
|
||||
|
@ -607,9 +607,15 @@ DO_2OP_SAT(vqsubsw, 4, int32_t, DO_SQSUB_W)
|
||||
WRAP_QRSHL_HELPER(do_sqrshl_bhs, N, M, false, satp)
|
||||
#define DO_UQSHL_OP(N, M, satp) \
|
||||
WRAP_QRSHL_HELPER(do_uqrshl_bhs, N, M, false, satp)
|
||||
#define DO_SQRSHL_OP(N, M, satp) \
|
||||
WRAP_QRSHL_HELPER(do_sqrshl_bhs, N, M, true, satp)
|
||||
#define DO_UQRSHL_OP(N, M, satp) \
|
||||
WRAP_QRSHL_HELPER(do_uqrshl_bhs, N, M, true, satp)
|
||||
|
||||
DO_2OP_SAT_S(vqshls, DO_SQSHL_OP)
|
||||
DO_2OP_SAT_U(vqshlu, DO_UQSHL_OP)
|
||||
DO_2OP_SAT_S(vqrshls, DO_SQRSHL_OP)
|
||||
DO_2OP_SAT_U(vqrshlu, DO_UQRSHL_OP)
|
||||
|
||||
#define DO_2OP_SCALAR(OP, ESIZE, TYPE, FN) \
|
||||
void HELPER(glue(mve_, OP))(CPUARMState *env, void *vd, void *vn, \
|
||||
|
@ -404,6 +404,8 @@ DO_2OP(VQSUB_S, vqsubs)
|
||||
DO_2OP(VQSUB_U, vqsubu)
|
||||
DO_2OP(VQSHL_S, vqshls)
|
||||
DO_2OP(VQSHL_U, vqshlu)
|
||||
DO_2OP(VQRSHL_S, vqrshls)
|
||||
DO_2OP(VQRSHL_U, vqrshlu)
|
||||
|
||||
static bool do_2op_scalar(DisasContext *s, arg_2scalar *a,
|
||||
MVEGenTwoOpScalarFn fn)
|
||||
|
Loading…
Reference in New Issue
Block a user