1316 Commits

Author SHA1 Message Date
Konstantinos Margaritis
a4972aa191 remove leftover debug print 2022-09-16 14:03:17 +03:00
Konstantinos Margaritis
0e0147ec5c clang 14 does not allow bitwise OR for bools 2022-09-16 14:02:53 +03:00
Konstantinos Margaritis
6de45b4648 clang 14 complains about this, needs investigation 2022-09-16 14:02:26 +03:00
Konstantinos Margaritis
3fc6c8a532 [VSX] movemask needs to be explicitly aligned on clang for vec_ste 2022-09-16 12:50:33 +03:00
Konstantinos Margaritis
ef66877e9e [VSX] clang complains about the order of __vector 2022-09-16 12:41:08 +03:00
Konstantinos Margaritis
67b414f2f9 [NEON] simplify/optimize shift/align primitives 2022-09-12 13:09:51 +00:00
liquidaty
f4840adf3d fix to enable successful build with mingw64 2022-09-08 09:59:37 -07:00
Konstantinos Margaritis
e3c237a7e0 use correct intrinsic for lshiftbyte_m128 2022-09-07 16:00:10 +03:00
Konstantinos Margaritis
756ef409b4 provide non-immediate versions of lshiftbyte/rshiftbyte on x86 2022-09-07 15:07:20 +03:00
Konstantinos Margaritis
1ae0d15181 readd simd_onebit_masks for x86, needs more work 2022-09-07 13:42:25 +03:00
Konstantinos Margaritis
0af2ba8616 [NEON] optimize mask1bit128, get rid of simd_onebit_masks 2022-09-07 10:20:01 +00:00
Konstantinos Margaritis
02ae2a3cad remove simd_onebit_masks from arm/x86 headers, as they moved to common 2022-09-07 12:41:32 +03:00
Konstantinos Margaritis
305a041c73 [VSX] optimize alignr method 2022-09-07 12:35:28 +03:00
Konstantinos Margaritis
a837cf3bee [VSX] optimize shift operators 2022-09-07 12:16:14 +03:00
Konstantinos Margaritis
be20c2c519 [VSX] optimize shifting methods, replace template Unroller 2022-09-07 12:14:15 +03:00
Konstantinos Margaritis
dc6b8ae92d optimize comparemask implementation, clean up code, use union types instead of casts 2022-09-07 02:02:11 +03:00
Konstantinos Margaritis
7295b9c718 [VSX] add algorithm for alignr w/o use of immediates 2022-09-07 00:01:54 +03:00
Konstantinos Margaritis
94fe406f0c [VSX] correct lshiftbyte_m128/rshiftbyte_m128, variable_byte_shift 2022-09-06 23:59:51 +03:00
Konstantinos Margaritis
17467ff21b [VSX] huge optimization of movemask128 2022-09-06 20:08:44 +03:00
Konstantinos Margaritis
0e7874f122 [VSX] optimize and correct lshift_m128/rshift_m128 2022-09-06 18:48:19 +03:00
Konstantinos Margaritis
026f761671 [VSX] optimized mask1bit128(), moved simd_onebit_masks to common 2022-09-06 18:10:55 +03:00
Konstantinos Margaritis
43c053a069 add popcount32x4, popcount64x4 helper functions 2022-09-06 16:55:56 +03:00
Hong, Yang A
70b2a28386 literal API: add empty string check.
fixes github issue #302, #304
2022-08-29 15:08:54 +03:00
Hong, Yang A
4d4940dfbe bugfix: fix overflow risk of strlen function 2022-08-29 15:03:22 +03:00
hongyang7
2731a3384b Fix segfaults on allocation failure (#4)
Throw std::bad_alloc instead of returning nullptr from
ue2::AlignedAllocator. Allocators for STL containers are expected never
to return with an invalid pointer, and instead must throw on failure.
Violating this expectation can lead to invalid pointer dereferences.

Co-authored-by: johanngan <johanngan.us@gmail.com>

fixes github issue #317 (PR #320)
2022-08-29 15:03:18 +03:00
Chang, Harry
c1659b8544 Logical Combination: bypass combination flag in hs_expression_info.
Fixes github issue #291
2022-08-29 15:03:14 +03:00
Hong, Yang A
decabdfede update year for bugfix #302-#305 2022-08-29 15:03:11 +03:00
Hong, Yang A
a119693a66 mcclellan: improve wide-state checking in Sherman optimization
fixes github issue #305
2022-08-29 15:03:06 +03:00
Hong, Yang A
cafd5248b1 literal API: add instruction support
fixes github issue #303
2022-08-29 15:02:59 +03:00
Danila Kutenin
7e7f604f7d Fix ppc64el debug 2022-06-26 23:05:17 +00:00
Danila Kutenin
849846700a Minor fix 2022-06-26 23:02:02 +00:00
Danila Kutenin
8a49e20bcd Fix formatting of a couple files 2022-06-26 22:59:58 +00:00
Danila Kutenin
49eb18ee4f Optimize vectorscan for aarch64 by using shrn instruction
This optimization is based on the thread
https://twitter.com/Danlark1/status/1539344279268691970 and uses
shift right and narrow by 4 instruction https://developer.arm.com/documentation/ddi0596/2020-12/SIMD-FP-Instructions/SHRN--SHRN2--Shift-Right-Narrow--immediate--

To achieve that, I needed to redesign a little movemask into comparemask
and have an additional step towards mask iteration. Our benchmarks
showed 10-15% improvement on average for long matches.
2022-06-26 22:55:45 +00:00
Daniel Kutenin
288491d6d9
Optimized and correct version of movemask128 for ARM
Closes #99

https://gcc.godbolt.org/z/cTjKqzcvn

Previous version was not correct because movemask thought of having bytes 0xFF. We can fully match the semantics + do it faster with USRA instructions.

Re-submission to a develop branch
2022-04-18 13:37:53 +01:00
Danila Kutenin
5f8729a085 Fix a couple of tests 2022-02-18 19:31:03 +00:00
Danila Kutenin
9af996b936 Fix all ASAN issues in vectorscan 2022-02-18 17:14:51 +00:00
BigRedEye
6d6c291769
fix: Mark operator bool explicit 2022-02-08 00:22:23 +03:00
Konstantinos Margaritis
467db4a268 Minor changes to enable compilation on Mac M1 2021-12-11 15:43:55 +02:00
Konstantinos Margaritis
4589f1742e minor fixes 2021-12-07 08:49:59 +00:00
Konstantinos Margaritis
fd2eabd071 fix clang-release-arm compilation 2021-12-07 08:43:52 +00:00
Konstantinos Margaritis
fec557c1f9 fix wrong castings for NEON 2021-12-06 21:35:51 +00:00
Konstantinos Margaritis
290eabbca0 fix compilation with clang and some incomplete/wrong implementations for arm this time 2021-12-06 18:22:58 +00:00
Konstantinos Margaritis
07ce6d8e7f fix build failures with clang on x86, make sure compilation works on other Power as well 2021-12-03 16:24:58 +02:00
Konstantinos Margaritis
5aae719ecd fix build with clang, in particular VSX uses long long instead of int64_t, gcc allows this, clang does not 2021-12-02 18:01:00 +02:00
Konstantinos Margaritis
4aa32275f1 use same definition of the union for all types 2021-12-02 18:00:02 +02:00
Konstantinos Margaritis
0221dc1771 fix misompilations with clang++, as it is more strict 2021-12-01 23:22:15 +02:00
Konstantinos Margaritis
7d600c4fcb bump base requirements to SSE4.2 2021-12-01 23:20:02 +02:00
Konstantinos Margaritis
81fba99f3a fix SVE2 build after the changes 2021-11-25 18:48:24 +02:00
Konstantinos Margaritis
7ceca78db4 fix unit-internal release builds using __builtin_constant_p() as well 2021-11-25 15:09:01 +02:00
Konstantinos Margaritis
cd95b1a38c use __builtin_constant_p() instead for arm as well 2021-11-25 06:20:53 +00:00