kunpengcompute / hyperscan

A high-performance regular expression matching library
https://www.hyperscan.io
Other
88 stars 29 forks source link

hyperscan: support aarch64 platform #1

Closed tqltech closed 4 years ago

tqltech commented 4 years ago

Add aarch64 platform branch, which is fully compatible with armv8-a, and at the same time ensure that the use of x86 platform is not affected.

The modification can be divided into the following aspects : (1) CMakeLists.txt: add branches to judge x86 and aaarch64 platforms. (2) simd_arm.h: Use the neon instruction to implement 128 operation functions. (3) simd_x86.h: Save the original simd_utils.h file contents. (4) simd_utils.h: Select different header files (simd_x86.h or simd_arm.h) according to the platform judgment results. (5) Intrinsic function: There are multiple calls to the intrinsic function in the code, and the intrinsic function is encapsulated in the modification. (6) control_verbs.cpp / ExpressionParser.cpp / control_verbs.cpp / Parser.cpp: There are errors in generating these four files under the aarch64 platform. So the files are generated on the x86 platform and copied to the corresponding directory for use. Does not affect the functionality of the x86 platform.

bzhaoopenstack commented 4 years ago

Let's wait for the feedback from upstream side. I'm trying to create a connection with them. If upstream team could review and give some reviews, I'm afraid that the code should be changed. So this PR IMO, leave it here for now.