diff options
author | RSDuck <rsduck@users.noreply.github.com> | 2020-12-09 18:58:51 +0100 |
---|---|---|
committer | RSDuck <rsduck@users.noreply.github.com> | 2020-12-09 18:58:51 +0100 |
commit | 49b5860f0f3345362ef0e86621443d006e1e3cad (patch) | |
tree | 5b43351b4e0dcff6cfcac5a7e0f700a240bf2ec3 /src/ARMJIT_A64 | |
parent | d2cfd71c32b9b8d7b52249270ea124235d02de79 (diff) |
aligned_alloc instead of memalign
also carry over new Switch changes
Diffstat (limited to 'src/ARMJIT_A64')
-rw-r--r-- | src/ARMJIT_A64/ARMJIT_Compiler.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ARMJIT_A64/ARMJIT_Compiler.cpp b/src/ARMJIT_A64/ARMJIT_Compiler.cpp index 93563b9..5fe3fe7 100644 --- a/src/ARMJIT_A64/ARMJIT_Compiler.cpp +++ b/src/ARMJIT_A64/ARMJIT_Compiler.cpp @@ -1,5 +1,11 @@ +#include "ARMJIT_Compiler.h" + +#include "../ARMJIT_Internal.h" +#include "../ARMInterpreter.h" +#include "../Config.h" + #ifdef __SWITCH__ -#include "../switch/compat_switch.h" +#include <switch.h> extern char __start__; #else @@ -7,13 +13,7 @@ extern char __start__; #include <unistd.h> #endif -#include "ARMJIT_Compiler.h" - -#include "../ARMJIT_Internal.h" -#include "../ARMInterpreter.h" -#include "../Config.h" - -#include <malloc.h> +#include <stdlib.h> using namespace Arm64Gen; @@ -184,7 +184,7 @@ void Compiler::PopRegs(bool saveHiRegs) Compiler::Compiler() { #ifdef __SWITCH__ - JitRWBase = memalign(0x1000, JitMemSize); + JitRWBase = aligned_alloc(0x1000, JitMemSize); JitRXStart = (u8*)&__start__ - JitMemSize - 0x1000; JitRWStart = virtmemReserve(JitMemSize); |