mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 13:41:20 +02:00
21 lines
701 B
Diff
21 lines
701 B
Diff
backport of https://github.com/libretro/melonDS/commit/f060162dacb512ee88eb0bf9f504207c5f37fbd4
|
|
--- a/src/ARMJIT_x64/ARMJIT_Compiler.cpp
|
|
+++ b/src/ARMJIT_x64/ARMJIT_Compiler.cpp
|
|
@@ -449,14 +449,14 @@
|
|
void Compiler::LoadReg(int reg, X64Reg nativeReg)
|
|
{
|
|
if (reg != 15)
|
|
- MOV(32, R(nativeReg), MDisp(RCPU, offsetof(ARM, R[reg])));
|
|
+ MOV(32, R(nativeReg), MDisp(RCPU, offsetof(ARM, R) + reg*4));
|
|
else
|
|
MOV(32, R(nativeReg), Imm32(R15));
|
|
}
|
|
|
|
void Compiler::SaveReg(int reg, X64Reg nativeReg)
|
|
{
|
|
- MOV(32, MDisp(RCPU, offsetof(ARM, R[reg])), R(nativeReg));
|
|
+ MOV(32, MDisp(RCPU, offsetof(ARM, R) + reg*4), R(nativeReg));
|
|
}
|
|
|
|
// invalidates RSCRATCH and RSCRATCH3
|