From b159b5667a01286d6ddeb6dd8a367786d0d06eee Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 18 Aug 2018 18:21:52 +0200 Subject: [PATCH] - fix 8 and 16 bit store --- src/scripting/vm/jit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripting/vm/jit.cpp b/src/scripting/vm/jit.cpp index 04d8b867f..51d5696f0 100644 --- a/src/scripting/vm/jit.cpp +++ b/src/scripting/vm/jit.cpp @@ -569,19 +569,19 @@ JitFuncPtr JitCompile(VMScriptFunction *sfunc) // Store instructions. *(rA + rkC) = rB case OP_SB: // store byte NULL_POINTER_CHECK(PA, KC, X_WRITE_NIL); - cc.mov(x86::byte_ptr(PA, KC), regD[B]); + cc.mov(x86::byte_ptr(PA, KC), regD[B].r8Lo()); break; case OP_SB_R: NULL_POINTER_CHECK(PA, RC, X_WRITE_NIL); - cc.mov(x86::byte_ptr(PA, RC), regD[B]); + cc.mov(x86::byte_ptr(PA, RC), regD[B].r8Lo()); break; case OP_SH: // store halfword NULL_POINTER_CHECK(PA, KC, X_WRITE_NIL); - cc.mov(x86::word_ptr(PA, KC), regD[B]); + cc.mov(x86::word_ptr(PA, KC), regD[B].r16()); break; case OP_SH_R: NULL_POINTER_CHECK(PA, RC, X_WRITE_NIL); - cc.mov(x86::word_ptr(PA, RC), regD[B]); + cc.mov(x86::word_ptr(PA, RC), regD[B].r16()); break; case OP_SW: // store word NULL_POINTER_CHECK(PA, KC, X_WRITE_NIL);