AsmJit update

This commit is contained in:
Petr Kobalicek 2019-08-19 20:54:47 +02:00 committed by Christoph Oelckers
commit 747b3dfcfe
165 changed files with 51918 additions and 45114 deletions

View file

@ -57,9 +57,9 @@ static void CastTID2S(FString *a, int b) { auto tex = TexMan.GetTexture(*(FTextu
void JitCompiler::EmitCAST()
{
asmjit::X86Gp tmp, resultD;
asmjit::X86Xmm resultF;
asmjit::CCFuncCall *call = nullptr;
asmjit::x86::Gp tmp, resultD;
asmjit::x86::Xmm resultF;
asmjit::FuncCallNode *call = nullptr;
switch (C)
{
@ -185,7 +185,7 @@ void JitCompiler::EmitCASTB()
if (C == CASTB_I)
{
cc.cmp(regD[B], (int)0);
cc.setne(regD[A]);
cc.setne(regD[A].r8());
cc.movzx(regD[A], regD[A].r8Lo()); // not sure if this is needed
}
else if (C == CASTB_F)
@ -196,13 +196,13 @@ void JitCompiler::EmitCASTB()
cc.mov(one, 1);
cc.xor_(regD[A], regD[A]);
cc.ucomisd(regF[B], zero);
cc.setp(regD[A]);
cc.setp(regD[A].r8());
cc.cmovne(regD[A], one);
}
else if (C == CASTB_A)
{
cc.test(regA[B], regA[B]);
cc.setne(regD[A]);
cc.setne(regD[A].r8());
cc.movzx(regD[A], regD[A].r8Lo()); // not sure if this is needed
}
else
@ -234,7 +234,7 @@ void JitCompiler::EmitDYNCAST_K()
{
auto result = newResultIntPtr();
auto c = newTempIntPtr();
cc.mov(c, asmjit::imm_ptr(konsta[C].o));
cc.mov(c, asmjit::imm(konsta[C].o));
auto call = CreateCall<DObject*, DObject*, PClass*>(DynCast);
call->setRet(0, result);
call->setArg(0, regA[B]);
@ -262,7 +262,7 @@ void JitCompiler::EmitDYNCASTC_K()
using namespace asmjit;
auto result = newResultIntPtr();
auto c = newTempIntPtr();
cc.mov(c, asmjit::imm_ptr(konsta[C].o));
cc.mov(c, asmjit::imm(konsta[C].o));
typedef PClass*(*FuncPtr)(PClass*, PClass*);
auto call = CreateCall<PClass*, PClass*, PClass*>(DynCastC);
call->setRet(0, result);