mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 16:07:55 +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,17 +169,29 @@ void JitCompiler::EmitRET()
|
||||||
if (cc.is64Bit())
|
if (cc.is64Bit())
|
||||||
{
|
{
|
||||||
if (regtype & REGT_KONST)
|
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
|
else
|
||||||
|
{
|
||||||
cc.mov(x86::qword_ptr(location), regA[regnum]);
|
cc.mov(x86::qword_ptr(location), regA[regnum]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (regtype & REGT_KONST)
|
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
|
else
|
||||||
|
{
|
||||||
cc.mov(x86::dword_ptr(location), regA[regnum]);
|
cc.mov(x86::dword_ptr(location), regA[regnum]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue