aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ARMJIT_A64/ARMJIT_Compiler.cpp4
-rw-r--r--src/dolphin/Arm64Emitter.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/ARMJIT_A64/ARMJIT_Compiler.cpp b/src/ARMJIT_A64/ARMJIT_Compiler.cpp
index ef93905..4fbb804 100644
--- a/src/ARMJIT_A64/ARMJIT_Compiler.cpp
+++ b/src/ARMJIT_A64/ARMJIT_Compiler.cpp
@@ -483,12 +483,12 @@ void Compiler::LoadReg(int reg, ARM64Reg nativeReg)
if (reg == 15)
MOVI2R(nativeReg, R15);
else
- LDR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R[reg]));
+ LDR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R) + reg*4);
}
void Compiler::SaveReg(int reg, ARM64Reg nativeReg)
{
- STR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R[reg]));
+ STR(INDEX_UNSIGNED, nativeReg, RCPU, offsetof(ARM, R) + reg*4);
}
void Compiler::LoadCPSR()
diff --git a/src/dolphin/Arm64Emitter.cpp b/src/dolphin/Arm64Emitter.cpp
index ae6258d..408411c 100644
--- a/src/dolphin/Arm64Emitter.cpp
+++ b/src/dolphin/Arm64Emitter.cpp
@@ -7,6 +7,7 @@
#include <cinttypes>
#include <cstring>
#include <vector>
+#include <limits>
#include "Compat.h"
#include "Align.h"