mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- fix 32 bit compile errors
This commit is contained in:
parent
f321f64a05
commit
47bcf318a5
3 changed files with 29 additions and 34 deletions
|
@ -272,11 +272,10 @@ void JitCompiler::EmitThrowException(EVMAbortException reason)
|
|||
|
||||
// Update JitExceptionInfo struct
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 0 * 4), (int32_t)reason);
|
||||
#ifdef ASMJIT_ARCH_64BIT
|
||||
if (cc.is64Bit())
|
||||
cc.mov(x86::qword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#else
|
||||
else
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#endif
|
||||
|
||||
// Return from function
|
||||
X86Gp vReg = newTempInt32();
|
||||
|
@ -291,11 +290,10 @@ void JitCompiler::EmitThrowException(EVMAbortException reason, asmjit::X86Gp arg
|
|||
// Update JitExceptionInfo struct
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 0 * 4), (int32_t)reason);
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 1 * 4), arg1);
|
||||
#ifdef ASMJIT_ARCH_64BIT
|
||||
if (cc.is64Bit())
|
||||
cc.mov(x86::qword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#else
|
||||
else
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#endif
|
||||
|
||||
// Return from function
|
||||
X86Gp vReg = newTempInt32();
|
||||
|
|
|
@ -195,17 +195,20 @@ void JitCompiler::EmitRET()
|
|||
break;
|
||||
}
|
||||
case REGT_POINTER:
|
||||
#ifdef ASMJIT_ARCH_64BIT
|
||||
if (cc.is64Bit())
|
||||
{
|
||||
if (regtype & REGT_KONST)
|
||||
cc.mov(x86::qword_ptr(location), asmjit::imm_ptr(konsta[regnum].v));
|
||||
else
|
||||
cc.mov(x86::qword_ptr(location), regA[regnum]);
|
||||
#else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (regtype & REGT_KONST)
|
||||
cc.mov(x86::dword_ptr(location), asmjit::imm_ptr(konsta[regnum].v));
|
||||
else
|
||||
cc.mov(x86::dword_ptr(location), regA[regnum]);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,13 +52,10 @@ void JitCompiler::EmitLKS_R()
|
|||
auto base = newTempIntPtr();
|
||||
cc.mov(base, asmjit::imm_ptr(konsts + C));
|
||||
auto ptr = newTempIntPtr();
|
||||
#ifdef ASMJIT_ARCH_64BIT
|
||||
static_assert(sizeof(FString) == 8, "sizeof(FString) needs to be 8");
|
||||
if (cc.is64Bit())
|
||||
cc.lea(ptr, asmjit::x86::ptr(base, regD[B], 3));
|
||||
#else
|
||||
static_assert(sizeof(FString) == 4, "sizeof(FString) needs to be 4");
|
||||
else
|
||||
cc.lea(ptr, asmjit::x86::ptr(base, regD[B], 2));
|
||||
#endif
|
||||
auto call = CreateCall<void, FString*, FString*>(&JitCompiler::CallAssignString);
|
||||
call->setArg(0, regS[A]);
|
||||
call->setArg(1, ptr);
|
||||
|
@ -68,13 +65,10 @@ void JitCompiler::EmitLKP_R()
|
|||
{
|
||||
auto base = newTempIntPtr();
|
||||
cc.mov(base, asmjit::imm_ptr(konsta + C));
|
||||
#ifdef ASMJIT_ARCH_64BIT
|
||||
static_assert(sizeof(FVoidObj) == 8, "sizeof(FVoidObj) needs to be 8");
|
||||
if (cc.is64Bit())
|
||||
cc.mov(regA[A], asmjit::x86::ptr(base, regD[B], 3));
|
||||
#else
|
||||
static_assert(sizeof(FVoidObj) == 4, "sizeof(FVoidObj) needs to be 4");
|
||||
else
|
||||
cc.mov(regA[A], asmjit::x86::ptr(base, regD[B], 2));
|
||||
#endif
|
||||
}
|
||||
|
||||
void JitCompiler::EmitLFP()
|
||||
|
|
Loading…
Reference in a new issue