mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
target/arm: Implement SVE bitwise shift by vector (predicated)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180516223007.10256-12-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
ccd841c3d7
commit
27721dbb7a
4 changed files with 64 additions and 0 deletions
|
@ -440,6 +440,28 @@ DO_ZPZZ_D(sve_sdiv_zpzz_d, int64_t, DO_DIV)
|
|||
DO_ZPZZ(sve_udiv_zpzz_s, uint32_t, H1_4, DO_DIV)
|
||||
DO_ZPZZ_D(sve_udiv_zpzz_d, uint64_t, DO_DIV)
|
||||
|
||||
/* Note that all bits of the shift are significant
|
||||
and not modulo the element size. */
|
||||
#define DO_ASR(N, M) (N >> MIN(M, sizeof(N) * 8 - 1))
|
||||
#define DO_LSR(N, M) (M < sizeof(N) * 8 ? N >> M : 0)
|
||||
#define DO_LSL(N, M) (M < sizeof(N) * 8 ? N << M : 0)
|
||||
|
||||
DO_ZPZZ(sve_asr_zpzz_b, int8_t, H1, DO_ASR)
|
||||
DO_ZPZZ(sve_lsr_zpzz_b, uint8_t, H1_2, DO_LSR)
|
||||
DO_ZPZZ(sve_lsl_zpzz_b, uint8_t, H1_4, DO_LSL)
|
||||
|
||||
DO_ZPZZ(sve_asr_zpzz_h, int16_t, H1, DO_ASR)
|
||||
DO_ZPZZ(sve_lsr_zpzz_h, uint16_t, H1_2, DO_LSR)
|
||||
DO_ZPZZ(sve_lsl_zpzz_h, uint16_t, H1_4, DO_LSL)
|
||||
|
||||
DO_ZPZZ(sve_asr_zpzz_s, int32_t, H1, DO_ASR)
|
||||
DO_ZPZZ(sve_lsr_zpzz_s, uint32_t, H1_2, DO_LSR)
|
||||
DO_ZPZZ(sve_lsl_zpzz_s, uint32_t, H1_4, DO_LSL)
|
||||
|
||||
DO_ZPZZ_D(sve_asr_zpzz_d, int64_t, DO_ASR)
|
||||
DO_ZPZZ_D(sve_lsr_zpzz_d, uint64_t, DO_LSR)
|
||||
DO_ZPZZ_D(sve_lsl_zpzz_d, uint64_t, DO_LSL)
|
||||
|
||||
#undef DO_ZPZZ
|
||||
#undef DO_ZPZZ_D
|
||||
|
||||
|
@ -544,6 +566,9 @@ DO_VPZ_D(sve_uminv_d, uint64_t, uint64_t, -1, DO_MIN)
|
|||
#undef DO_ABD
|
||||
#undef DO_MUL
|
||||
#undef DO_DIV
|
||||
#undef DO_ASR
|
||||
#undef DO_LSR
|
||||
#undef DO_LSL
|
||||
|
||||
/* Similar to the ARM LastActiveElement pseudocode function, except the
|
||||
result is multiplied by the element size. This includes the not found
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue