- fix missing zero extend

This commit is contained in:
Magnus Norddahl 2018-09-09 23:21:47 +02:00 committed by drfrag
parent 29f6258d33
commit 53b11dd0d8

View file

@ -458,25 +458,25 @@ private:
void EmitLBU() void EmitLBU()
{ {
EmitNullPointerThrow(B, X_READ_NIL); EmitNullPointerThrow(B, X_READ_NIL);
cc.mov(regD[A], asmjit::x86::byte_ptr(regA[B], konstd[C])); cc.movzx(regD[A], asmjit::x86::byte_ptr(regA[B], konstd[C]));
} }
void EmitLBU_R() void EmitLBU_R()
{ {
EmitNullPointerThrow(B, X_READ_NIL); EmitNullPointerThrow(B, X_READ_NIL);
cc.mov(regD[A], asmjit::x86::byte_ptr(regA[B], regD[C])); cc.movzx(regD[A].r8Lo(), asmjit::x86::byte_ptr(regA[B], regD[C]));
} }
void EmitLHU() void EmitLHU()
{ {
EmitNullPointerThrow(B, X_READ_NIL); EmitNullPointerThrow(B, X_READ_NIL);
cc.mov(regD[A], asmjit::x86::word_ptr(regA[B], konstd[C])); cc.movzx(regD[A].r16(), asmjit::x86::word_ptr(regA[B], konstd[C]));
} }
void EmitLHU_R() void EmitLHU_R()
{ {
EmitNullPointerThrow(B, X_READ_NIL); EmitNullPointerThrow(B, X_READ_NIL);
cc.mov(regD[A], asmjit::x86::word_ptr(regA[B], regD[C])); cc.movzx(regD[A].r16(), asmjit::x86::word_ptr(regA[B], regD[C]));
} }
void EmitLSP() void EmitLSP()
@ -3054,7 +3054,7 @@ static void OutputJitLog(const asmjit::StringLogger &logger)
JitFuncPtr JitCompile(VMScriptFunction *sfunc) JitFuncPtr JitCompile(VMScriptFunction *sfunc)
{ {
#if defined(DEBUG_JIT) #if defined(DEBUG_JIT)
if (strcmp(sfunc->Name.GetChars(), "CanPickup") != 0) if (strcmp(sfunc->PrintableName.GetChars(), "Key.ShouldStay") != 0)
return nullptr; return nullptr;
#else #else
if (!JitCompiler::CanJit(sfunc)) if (!JitCompiler::CanJit(sfunc))