From: Richard Henderson <[email protected]> We will shortly need this outside of sme_helper.c.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Richard Henderson <[email protected]> Message-id: [email protected] Signed-off-by: Peter Maydell <[email protected]> --- target/arm/tcg/sme_helper.c | 6 ------ target/arm/tcg/vec_internal.h | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/target/arm/tcg/sme_helper.c b/target/arm/tcg/sme_helper.c index ab5999c592..0055e97a2b 100644 --- a/target/arm/tcg/sme_helper.c +++ b/target/arm/tcg/sme_helper.c @@ -33,12 +33,6 @@ #define HELPER_H "tcg/helper-sme-defs.h" #include "exec/helper-info.c.inc" -static bool vectors_overlap(ARMVectorReg *x, unsigned nx, - ARMVectorReg *y, unsigned ny) -{ - return !(x + nx <= y || y + ny <= x); -} - void helper_set_svcr(CPUARMState *env, uint32_t val, uint32_t mask) { aarch64_set_svcr(env, val, mask); diff --git a/target/arm/tcg/vec_internal.h b/target/arm/tcg/vec_internal.h index 758e3db1c3..84f7f15228 100644 --- a/target/arm/tcg/vec_internal.h +++ b/target/arm/tcg/vec_internal.h @@ -21,6 +21,7 @@ #define TARGET_ARM_VEC_INTERNAL_H #include "fpu/softfloat.h" +#include "vector-type.h" typedef struct CPUArchState CPUARMState; @@ -463,6 +464,13 @@ static inline void depositn(uint64_t *p, unsigned pos, } } +/* Determine if [x, x+nx) overlaps [y, y+ny). */ +static inline bool vectors_overlap(ARMVectorReg *x, unsigned nx, + ARMVectorReg *y, unsigned ny) +{ + return !(x + nx <= y || y + ny <= x); +} + #define DO_3OP(NAME, FUNC, TYPE) \ void HELPER(NAME)(void *vd, void *vn, void *vm, \ float_status * stat, uint32_t desc) \ -- 2.43.0
