blob: 4c1fb29ca7bbf1cea954e5f7dd4d2d652f3b09b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From 42f7f35d893a6bfff89c5da05cb497ddabef1a2a Mon Sep 17 00:00:00 2001
From: Francesco Abbate <francesco.bbt@gmail.com>
Date: Thu, 27 Jun 2024 18:33:13 +0200
Subject: [PATCH] fix problem with __m128i undefined on ARM
---
src/HexDialogs.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/HexDialogs.cpp b/src/HexDialogs.cpp
index 80af2da..8eecdc8 100644
--- a/src/HexDialogs.cpp
+++ b/src/HexDialogs.cpp
@@ -1311,17 +1311,22 @@ void FindDialog::OnFindAll( bool internal ) {
//Returns indice of first found if used with ( options & SEARCH_FINDALL) ret_ptr return vector pointer filled with locations at buffer
//WARNING! THIS FUNCTION WILL CHANGE BFR and/or SEARCH strings if SEARCH_MATCHCASE not selected as an option!
inline int FindDialog::SearchAtBuffer( char *bfr, int bfr_size, char* search, int search_size, unsigned options, std::vector<int> *ret_ptr ) {
+#ifdef __SSE2__
static const int REG_SZ = sizeof(__m128i);
char internal_array[REG_SZ];
+#endif
if( bfr_size < search_size )
return -1;
+
+#ifdef __SSE2__
if(bfr_size < REG_SZ) {
memset(&internal_array[0], 0, sizeof(internal_array));
memcpy(&internal_array[0], bfr, bfr_size);
bfr = &internal_array[0];
}
+#endif
///SEARCH_FINDALL operation supersedes SEARCH_BACKWARDS and SEARCH_WRAPAROUND
if(options & SEARCH_FINDALL)
|