mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-26 15:50:00 -06:00
JIT: Add bits for Windows ARM64 support
This commit is contained in:
@ -16,6 +16,10 @@
|
||||
#include "../types.h"
|
||||
#include "MathUtil.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <libkern/OSCacheControl.h>
|
||||
#endif
|
||||
@ -392,6 +396,8 @@ void ARM64XEmitter::FlushIcacheSection(u8* start, u8* end)
|
||||
#if defined(__APPLE__)
|
||||
// Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
|
||||
sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
|
||||
#elif defined(_WIN32)
|
||||
FlushInstructionCache(GetCurrentProcess(), start, end - start);
|
||||
#else
|
||||
// Don't rely on GCC's __clear_cache implementation, as it caches
|
||||
// icache/dcache cache line sizes, that can vary between cores on
|
||||
|
Reference in New Issue
Block a user