Windows/ARM64: Add initial support.
Only builds with native ARM64 Visual Studio for now. Thanks to vanc and Stephen Just. #593 #964
This commit is contained in:
@@ -29,6 +29,11 @@
|
||||
#include <valgrind/valgrind.h>
|
||||
#endif
|
||||
|
||||
#if LJ_TARGET_WINDOWS
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if LJ_TARGET_IOS
|
||||
void sys_icache_invalidate(void *start, size_t len);
|
||||
#endif
|
||||
@@ -41,6 +46,8 @@ void lj_mcode_sync(void *start, void *end)
|
||||
#endif
|
||||
#if LJ_TARGET_X86ORX64
|
||||
UNUSED(start); UNUSED(end);
|
||||
#elif LJ_TARGET_WINDOWS
|
||||
FlushInstructionCache(GetCurrentProcess(), start, (char *)end-(char *)start);
|
||||
#elif LJ_TARGET_IOS
|
||||
sys_icache_invalidate(start, (char *)end-(char *)start);
|
||||
#elif LJ_TARGET_PPC
|
||||
@@ -58,9 +65,6 @@ void lj_mcode_sync(void *start, void *end)
|
||||
|
||||
#if LJ_TARGET_WINDOWS
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
#define MCPROT_RW PAGE_READWRITE
|
||||
#define MCPROT_RX PAGE_EXECUTE_READ
|
||||
#define MCPROT_RWX PAGE_EXECUTE_READWRITE
|
||||
|
||||
Reference in New Issue
Block a user