VectorCamp / vectorscan

A portable fork of the high-performance regular expression matching library
https://www.vectorcamp.gr/project/vectorscan/
Other
503 stars 54 forks source link

Compile error on armv7-a and cortex-a7 or cortex-a15. #218

Open ody-26 opened 9 months ago

ody-26 commented 9 months ago

Hi vectorscan team:

I am trying to build vectorscan on several ARM 32 platform, such as armv7-a and cortex-a7 or cortex-a15, but I encountered the following errors:

/mnt/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/vectorscan-vectorscan-5.4.11/src/util/arch/arm/simd_ut ils.h: In function 'diffrich128': /mnt/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/vectorscan-vectorscan-5.4.11/src/util/arch/arm/simd_ut ils.h:86:12: warning: implicit declaration of function 'vaddvq_u32'; did you mean 'vaddq_u32'? [-Wimplicit-function-decl aration] 86 | return vaddvq_u32(vandq_u32(vmvnq_u32(vceqq_u32((uint32x4_t)a, (uint32x4_t)b)), movemask)); | ^~~~~~ | vaddq_u32 /mnt/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/vectorscan-vectorscan-5.4.11/src/util/arch/arm/simd_ut ils.h: In function 'diffrich64_128': /mnt/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/vectorscan-vectorscan-5.4.11/src/util/arch/arm/simd_ut ils.h:95:18: warning: implicit declaration of function 'vaddvq_u64'; did you mean 'vaddq_u64'? [-Wimplicit-function-decl aration] 95 | return (u32) vaddvq_u64(vandq_u64((uint64x2_t)vmvnq_u32((uint32x4_t)vceqq_u64((uint64x2_t)a, (uint64x2_t)b)) , movemask)); | ^~~~~~ | vaddq_u64

I have conducted some research, and it appears that for ARMv7, the vaddvq_u32 function is found in arm_mve.h rather than arm_neon.h. However, Vectorscan only checks and utilizes NEON or SVE/SVE2. My question is whether Vectorscan supports ARM32. If it does, how can I build it on the ARM32 platform?

markos commented 9 months ago

@odyssey-qiu 32-bit support in general is being evaluated. As it is currently arm 32-bit is not even tested that it builds. If there is enough interest we might evaluate supporting it.

markos commented 9 months ago

This is a linked to #195

ody-26 commented 9 months ago

Yes, I have read comment #195. I initially thought it only eliminated support for Intel 32-bit. In reality, our setup involves a 64-bit ARM CPU, but our current OpenWRT OS is only 32-bit. Therefore, the ARCH is ARM, and the CPU_TYPE is cortex-a7/a9 during the Vectorscan build. I will attempt to transition to a 64-bit OS. Nonetheless, I believe there would be widespread interest if Vectorscan could also support 32-bit ARM ARCH.