Fix the ARM64 Code Emitter on macOS

This commit is contained in:
WaluigiWare64 2020-12-28 18:18:33 +05:00
parent e2de622d57
commit b24e855fb8
1 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,10 @@
#include "../types.h"
#include "MathUtil.h"
#ifdef __APPLE__
#include <libkern/OSCacheControl.h>
#endif
namespace Arm64Gen
{
namespace
@ -384,7 +388,7 @@ void ARM64XEmitter::FlushIcacheSection(u8* start, u8* end)
if (start == end)
return;
#if defined(IOS)
#if defined(__APPLE__)
// Header file says this is equivalent to: sys_icache_invalidate(start, end - start);
sys_cache_control(kCacheFunctionPrepareForExecution, start, end - start);
#else