diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-06-17 13:16:00 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-06-21 17:12:50 +0100 |
commit | bc67aa8d561e6ebf93b724c9abf3a7a1f95839c9 (patch) | |
tree | b1d0a44bbce5cfa690408fc99b0ebb4c12ae0a05 /target | |
parent | cd367ff3919e020b50a10cf4955fc31042e73f24 (diff) | |
download | qemu-bc67aa8d561e6ebf93b724c9abf3a7a1f95839c9.zip qemu-bc67aa8d561e6ebf93b724c9abf3a7a1f95839c9.tar.gz qemu-bc67aa8d561e6ebf93b724c9abf3a7a1f95839c9.tar.bz2 |
target/arm: Implement MVE VABD
Implement the MVE VABD insn.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210617121628.20116-17-peter.maydell@linaro.org
Diffstat (limited to 'target')
-rw-r--r-- | target/arm/helper-mve.h | 7 | ||||
-rw-r--r-- | target/arm/mve.decode | 3 | ||||
-rw-r--r-- | target/arm/mve_helper.c | 5 | ||||
-rw-r--r-- | target/arm/translate-mve.c | 2 |
4 files changed, 17 insertions, 0 deletions
diff --git a/target/arm/helper-mve.h b/target/arm/helper-mve.h index 5181d3b..5cd4e7d 100644 --- a/target/arm/helper-mve.h +++ b/target/arm/helper-mve.h @@ -109,3 +109,10 @@ DEF_HELPER_FLAGS_4(mve_vminsw, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) DEF_HELPER_FLAGS_4(mve_vminub, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) DEF_HELPER_FLAGS_4(mve_vminuh, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) DEF_HELPER_FLAGS_4(mve_vminuw, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) + +DEF_HELPER_FLAGS_4(mve_vabdsb, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) +DEF_HELPER_FLAGS_4(mve_vabdsh, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) +DEF_HELPER_FLAGS_4(mve_vabdsw, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) +DEF_HELPER_FLAGS_4(mve_vabdub, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) +DEF_HELPER_FLAGS_4(mve_vabduh, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) +DEF_HELPER_FLAGS_4(mve_vabduw, TCG_CALL_NO_WG, void, env, ptr, ptr, ptr) diff --git a/target/arm/mve.decode b/target/arm/mve.decode index 42d5504..087d3db 100644 --- a/target/arm/mve.decode +++ b/target/arm/mve.decode @@ -93,6 +93,9 @@ VMAX_U 111 1 1111 0 . .. ... 0 ... 0 0110 . 1 . 0 ... 0 @2op VMIN_S 111 0 1111 0 . .. ... 0 ... 0 0110 . 1 . 1 ... 0 @2op VMIN_U 111 1 1111 0 . .. ... 0 ... 0 0110 . 1 . 1 ... 0 @2op +VABD_S 111 0 1111 0 . .. ... 0 ... 0 0111 . 1 . 0 ... 0 @2op +VABD_U 111 1 1111 0 . .. ... 0 ... 0 0111 . 1 . 0 ... 0 @2op + # Vector miscellaneous VCLS 1111 1111 1 . 11 .. 00 ... 0 0100 01 . 0 ... 0 @1op diff --git a/target/arm/mve_helper.c b/target/arm/mve_helper.c index c040e42..63eacd7 100644 --- a/target/arm/mve_helper.c +++ b/target/arm/mve_helper.c @@ -424,3 +424,8 @@ DO_2OP_S(vmaxs, DO_MAX) DO_2OP_U(vmaxu, DO_MAX) DO_2OP_S(vmins, DO_MIN) DO_2OP_U(vminu, DO_MIN) + +#define DO_ABD(N, M) ((N) >= (M) ? (N) - (M) : (M) - (N)) + +DO_2OP_S(vabds, DO_ABD) +DO_2OP_U(vabdu, DO_ABD) diff --git a/target/arm/translate-mve.c b/target/arm/translate-mve.c index 107c393..041fd1e 100644 --- a/target/arm/translate-mve.c +++ b/target/arm/translate-mve.c @@ -355,3 +355,5 @@ DO_2OP(VMAX_S, vmaxs) DO_2OP(VMAX_U, vmaxu) DO_2OP(VMIN_S, vmins) DO_2OP(VMIN_U, vminu) +DO_2OP(VABD_S, vabds) +DO_2OP(VABD_U, vabdu) |