mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target/arm: Implement MVE VRHADD
Implement the MVE VRHADD insn, which performs a rounded halving addition. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20210617121628.20116-40-peter.maydell@linaro.org
This commit is contained in:
parent
43364321f3
commit
1eb987a89d
4 changed files with 19 additions and 0 deletions
|
@ -531,6 +531,12 @@ DO_2OP_U(vshlu, DO_VSHLU)
|
|||
DO_2OP_S(vrshls, DO_VRSHLS)
|
||||
DO_2OP_U(vrshlu, DO_VRSHLU)
|
||||
|
||||
#define DO_RHADD_S(N, M) (((int64_t)(N) + (M) + 1) >> 1)
|
||||
#define DO_RHADD_U(N, M) (((uint64_t)(N) + (M) + 1) >> 1)
|
||||
|
||||
DO_2OP_S(vrhadds, DO_RHADD_S)
|
||||
DO_2OP_U(vrhaddu, DO_RHADD_U)
|
||||
|
||||
static inline int32_t do_sat_bhw(int64_t val, int64_t min, int64_t max, bool *s)
|
||||
{
|
||||
if (val > max) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue