From 3b886c8b7b40afa3a5a02f123981dcdd7d3ea643 Mon Sep 17 00:00:00 2001 From: kobalicek Date: Thu, 10 Dec 2020 01:21:16 +0100 Subject: [PATCH] Fixed the use of __buildin___clear_cache() --- src/asmjit/core/jitruntime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asmjit/core/jitruntime.cpp b/src/asmjit/core/jitruntime.cpp index 381979e..a2b46d7 100644 --- a/src/asmjit/core/jitruntime.cpp +++ b/src/asmjit/core/jitruntime.cpp @@ -42,8 +42,8 @@ static inline void JitRuntime_flushInstructionCache(const void* p, size_t size) // Windows has a built-in support in `kernel32.dll`. ::FlushInstructionCache(::GetCurrentProcess(), p, size); # elif defined(__GNUC__) - void* start = const_cast(p); - void* end = static_cast(start) + size; + char* start = static_cast(const_cast(p)); + char* end = start + size; __builtin___clear_cache(start, end); # else DebugUtils::unused(p, size);