From 5611249af7b4650d02bbdb7cce4502422edc3656 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Fri, 18 Oct 2019 18:04:13 +0200 Subject: [PATCH] Fixed __builtin___clear_cache detection --- src/crypto/randomx/jit_compiler_a64.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/randomx/jit_compiler_a64.cpp b/src/crypto/randomx/jit_compiler_a64.cpp index 586b407f..f88f945a 100644 --- a/src/crypto/randomx/jit_compiler_a64.cpp +++ b/src/crypto/randomx/jit_compiler_a64.cpp @@ -109,7 +109,7 @@ void sys_icache_invalidate(void *start, size_t len); static void clear_code_cache(char* p1, char* p2) { -# ifdef HAVE_BUILTIN_CLEAR_CACHE +# if defined (HAVE_BUILTIN_CLEAR_CACHE) || defined (__GNUC__) __builtin___clear_cache(p1, p2); # elif defined(ios_HOST_OS) || defined (darwin_HOST_OS) sys_icache_invalidate(p1, static_cast(p2 - p1));