From bba422ffcc55d1916ee8ab3d04788d76580f95c0 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 30 Aug 2018 19:47:38 +0200 Subject: [PATCH] - fix offsetting bug when loading address registers --- src/scripting/vm/jit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripting/vm/jit.cpp b/src/scripting/vm/jit.cpp index ff35369e8..357bc784c 100644 --- a/src/scripting/vm/jit.cpp +++ b/src/scripting/vm/jit.cpp @@ -2409,7 +2409,7 @@ private: FString regname; regname.Format("regD%d", i); regD[i] = cc.newInt32(regname.GetChars()); - cc.mov(regD[i], x86::dword_ptr(initreg, i * 4)); + cc.mov(regD[i], x86::dword_ptr(initreg, i * sizeof(int32_t))); } } if (sfunc->NumRegF > 0) @@ -2420,7 +2420,7 @@ private: FString regname; regname.Format("regF%d", i); regF[i] = cc.newXmmSd(regname.GetChars()); - cc.movsd(regF[i], x86::qword_ptr(initreg, i * 8)); + cc.movsd(regF[i], x86::qword_ptr(initreg, i * sizeof(double))); } } /*if (sfunc->NumRegS > 0) @@ -2441,7 +2441,7 @@ private: FString regname; regname.Format("regA%d", i); regA[i] = cc.newIntPtr(regname.GetChars()); - cc.mov(regA[i], x86::ptr(initreg, i * 4)); + cc.mov(regA[i], x86::ptr(initreg, i * sizeof(void*))); } }