mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 04:24:37 +03:00
Fixed the use of __buildin___clear_cache()
This commit is contained in:
@@ -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<void*>(p);
|
||||
void* end = static_cast<uint8_t*>(start) + size;
|
||||
char* start = static_cast<char*>(const_cast<void*>(p));
|
||||
char* end = start + size;
|
||||
__builtin___clear_cache(start, end);
|
||||
# else
|
||||
DebugUtils::unused(p, size);
|
||||
|
||||
Reference in New Issue
Block a user