aboutsummaryrefslogtreecommitdiff
path: root/ports/pcre2/fix-arm64-config.patch
blob: bba95718ae7726ea95e53b66c8a2f18918401c87 (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
diff --git a/src/sljit/sljitConfigInternal.h b/src/sljit/sljitConfigInternal.h
index cc0810f..964afe8 100644
--- a/src/sljit/sljitConfigInternal.h
+++ b/src/sljit/sljitConfigInternal.h
@@ -151,6 +151,8 @@
 #define SLJIT_CONFIG_X86_64 1
 #elif defined(_ARM_)
 #define SLJIT_CONFIG_ARM_V5 1
+#elif defined(_M_ARM64)
+#define SLJIT_CONFIG_ARM_64 1
 #else
 #define SLJIT_CONFIG_X86_32 1
 #endif
@@ -324,9 +326,15 @@
 
 #else
 
+#if defined(__linux__)
 /* Calls __ARM_NR_cacheflush on ARM-Linux. */
 #define SLJIT_CACHE_FLUSH(from, to) \
 	__clear_cache((char*)(from), (char*)(to))
+#elif(_WIN32)
+#pragma comment(lib, "kernel32.lib")
+#define SLJIT_CACHE_FLUSH(from, to) \
+	FlushInstructionCache(GetCurrentProcess(), (void*)(from), (uintptr_t)(to - from));
+#endif
 
 #endif