mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
- workaround pointer truncation bug in asmjit
This commit is contained in:
parent
40f77e5dac
commit
f0ce453d47
1 changed files with 14 additions and 2 deletions
|
@ -169,16 +169,28 @@ void JitCompiler::EmitRET()
|
|||
if (cc.is64Bit())
|
||||
{
|
||||
if (regtype & REGT_KONST)
|
||||
cc.mov(x86::qword_ptr(location), asmjit::imm_ptr(konsta[regnum].v));
|
||||
{
|
||||
auto ptr = newTempIntPtr();
|
||||
cc.mov(ptr, asmjit::imm_ptr(konsta[regnum].v));
|
||||
cc.mov(x86::qword_ptr(location), ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
cc.mov(x86::qword_ptr(location), regA[regnum]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (regtype & REGT_KONST)
|
||||
cc.mov(x86::dword_ptr(location), asmjit::imm_ptr(konsta[regnum].v));
|
||||
{
|
||||
auto ptr = newTempIntPtr();
|
||||
cc.mov(ptr, asmjit::imm_ptr(konsta[regnum].v));
|
||||
cc.mov(x86::dword_ptr(location), ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
cc.mov(x86::dword_ptr(location), regA[regnum]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue