diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-06-17 13:15:52 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-06-21 17:12:50 +0100 |
commit | 399a8c766c0526b51cd180e1b1c776d6dc95bad8 (patch) | |
tree | 3ae5fd069fb6fcf432e263b01b784ca92e89d056 /target/arm/mve_helper.c | |
parent | 59c917733809c6ac7d08a10ec3cf23ae50130248 (diff) | |
download | qemu-399a8c766c0526b51cd180e1b1c776d6dc95bad8.zip qemu-399a8c766c0526b51cd180e1b1c776d6dc95bad8.tar.gz qemu-399a8c766c0526b51cd180e1b1c776d6dc95bad8.tar.bz2 |
target/arm: Implement MVE VNEG
Implement the MVE VNEG insn (both integer and floating point forms).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210617121628.20116-9-peter.maydell@linaro.org
Diffstat (limited to 'target/arm/mve_helper.c')
-rw-r--r-- | target/arm/mve_helper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/arm/mve_helper.c b/target/arm/mve_helper.c index 2cf28f0..7b662f9 100644 --- a/target/arm/mve_helper.c +++ b/target/arm/mve_helper.c @@ -294,3 +294,15 @@ DO_1OP(vabsw, 4, int32_t, DO_ABS) /* We can do these 64 bits at a time */ DO_1OP(vfabsh, 8, uint64_t, DO_FABSH) DO_1OP(vfabss, 8, uint64_t, DO_FABSS) + +#define DO_NEG(N) (-(N)) +#define DO_FNEGH(N) ((N) ^ dup_const(MO_16, 0x8000)) +#define DO_FNEGS(N) ((N) ^ dup_const(MO_32, 0x80000000)) + +DO_1OP(vnegb, 1, int8_t, DO_NEG) +DO_1OP(vnegh, 2, int16_t, DO_NEG) +DO_1OP(vnegw, 4, int32_t, DO_NEG) + +/* We can do these 64 bits at a time */ +DO_1OP(vfnegh, 8, uint64_t, DO_FNEGH) +DO_1OP(vfnegs, 8, uint64_t, DO_FNEGS) |