@samitouri / QOSamiQemu / commits / 1574211d1f

target/arm: Move vectors_overlap to vec_internal.h

We will shortly need this outside of sme_helper.c. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20260522220306.235200-24-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Richard Henderson committed May 22, 2026 at 15:02 UTC 1574211d1fd2052e90ede8865901c48fb391b132
2 files changed +8 -6
target/arm/tcg/sme_helper.c
-6
@@ -33,12 +33,6 @@
33 #define HELPER_H "tcg/helper-sme-defs.h"
34 #include "exec/helper-info.c.inc"
35
36 -static bool vectors_overlap(ARMVectorReg *x, unsigned nx,
37 - ARMVectorReg *y, unsigned ny)
38 -{
39 - return !(x + nx <= y || y + ny <= x);
40 -}
41 -
36 void helper_set_svcr(CPUARMState *env, uint32_t val, uint32_t mask)
37 {
38 aarch64_set_svcr(env, val, mask);
target/arm/tcg/vec_internal.h
+8
@@ -21,6 +21,7 @@
21 #define TARGET_ARM_VEC_INTERNAL_H
22
23 #include "fpu/softfloat.h"
24 +#include "vector-type.h"
25
26 typedef struct CPUArchState CPUARMState;
27
@@ -463,6 +464,13 @@ static inline void depositn(uint64_t *p, unsigned pos,
464 }
465 }
466
467 +/* Determine if [x, x+nx) overlaps [y, y+ny). */
468 +static inline bool vectors_overlap(ARMVectorReg *x, unsigned nx,
469 + ARMVectorReg *y, unsigned ny)
470 +{
471 + return !(x + nx <= y || y + ny <= x);
472 +}
473 +
474 #define DO_3OP(NAME, FUNC, TYPE) \
475 void HELPER(NAME)(void *vd, void *vn, void *vm, \
476 float_status * stat, uint32_t desc) \