mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- fix 32 bit compile errors
This commit is contained in:
parent
e2dcca611c
commit
b3aeb37189
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
|
||||
cc.mov(x86::qword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#else
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#endif
|
||||
if (cc.is64Bit())
|
||||
cc.mov(x86::qword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
else
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
|
||||
// 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
|
||||
cc.mov(x86::qword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#else
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
#endif
|
||||
if (cc.is64Bit())
|
||||
cc.mov(x86::qword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
else
|
||||
cc.mov(x86::dword_ptr(exceptInfo, 4 * 4), imm_ptr(pc));
|
||||
|
||||
// Return from function
|
||||
X86Gp vReg = newTempInt32();
|
||||
|
|
|
@ -195,17 +195,20 @@ void JitCompiler::EmitRET()
|
|||
break;
|
||||
}
|
||||
case REGT_POINTER:
|
||||
#ifdef ASMJIT_ARCH_64BIT
|
||||
if (regtype & REGT_KONST)
|
||||
cc.mov(x86::qword_ptr(location), asmjit::imm_ptr(konsta[regnum].v));
|
||||
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
|
||||
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));
|
||||
else
|
||||
cc.mov(x86::dword_ptr(location), regA[regnum]);
|
||||
#endif
|
||||
{
|
||||
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]);
|
||||
}
|
||||
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");
|
||||
cc.lea(ptr, asmjit::x86::ptr(base, regD[B], 3));
|
||||
#else
|
||||
static_assert(sizeof(FString) == 4, "sizeof(FString) needs to be 4");
|
||||
cc.lea(ptr, asmjit::x86::ptr(base, regD[B], 2));
|
||||
#endif
|
||||
if (cc.is64Bit())
|
||||
cc.lea(ptr, asmjit::x86::ptr(base, regD[B], 3));
|
||||
else
|
||||
cc.lea(ptr, asmjit::x86::ptr(base, regD[B], 2));
|
||||
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");
|
||||
cc.mov(regA[A], asmjit::x86::ptr(base, regD[B], 3));
|
||||
#else
|
||||
static_assert(sizeof(FVoidObj) == 4, "sizeof(FVoidObj) needs to be 4");
|
||||
cc.mov(regA[A], asmjit::x86::ptr(base, regD[B], 2));
|
||||
#endif
|
||||
if (cc.is64Bit())
|
||||
cc.mov(regA[A], asmjit::x86::ptr(base, regD[B], 3));
|
||||
else
|
||||
cc.mov(regA[A], asmjit::x86::ptr(base, regD[B], 2));
|
||||
}
|
||||
|
||||
void JitCompiler::EmitLFP()
|
||||
|
|
Loading…
Reference in a new issue