- fix missing convert from float to double in LSP and LSP_R opcodes

- fix missing convert from double to float in SSP and SSP_R opcodes
This commit is contained in:
Magnus Norddahl 2018-10-11 03:53:11 +02:00
parent aa6e09f7e8
commit fc870fce87
2 changed files with 12 additions and 4 deletions

View file

@ -172,13 +172,15 @@ void JitCompiler::EmitLHU_R()
void JitCompiler::EmitLSP()
{
EmitNullPointerThrow(B, X_READ_NIL);
cc.movss(regF[A], asmjit::x86::dword_ptr(regA[B], konstd[C]));
cc.xorpd(regF[A], regF[A]);
cc.cvtss2sd(regF[A], asmjit::x86::dword_ptr(regA[B], konstd[C]));
}
void JitCompiler::EmitLSP_R()
{
EmitNullPointerThrow(B, X_READ_NIL);
cc.movss(regF[A], asmjit::x86::dword_ptr(regA[B], regD[C]));
cc.xorpd(regF[A], regF[A]);
cc.cvtss2sd(regF[A], asmjit::x86::dword_ptr(regA[B], regD[C]));
}
void JitCompiler::EmitLDP()

View file

@ -40,13 +40,19 @@ void JitCompiler::EmitSW_R()
void JitCompiler::EmitSSP()
{
EmitNullPointerThrow(A, X_WRITE_NIL);
cc.movss(asmjit::x86::dword_ptr(regA[A], konstd[C]), regF[B]);
auto tmp = newTempXmmSd();
cc.xorpd(tmp, tmp);
cc.cvtsd2ss(tmp, regF[B]);
cc.movss(asmjit::x86::dword_ptr(regA[A], konstd[C]), tmp);
}
void JitCompiler::EmitSSP_R()
{
EmitNullPointerThrow(A, X_WRITE_NIL);
cc.movss(asmjit::x86::dword_ptr(regA[A], regD[C]), regF[B]);
auto tmp = newTempXmmSd();
cc.xorpd(tmp, tmp);
cc.cvtsd2ss(tmp, regF[B]);
cc.movss(asmjit::x86::dword_ptr(regA[A], regD[C]), tmp);
}
void JitCompiler::EmitSDP()