mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 17:41:19 +00:00
- implement OP_LFP
This commit is contained in:
parent
7f996b5334
commit
097de74510
3 changed files with 13 additions and 10 deletions
|
@ -150,7 +150,6 @@ bool JitCompiler::CanJit(VMScriptFunction *sfunc)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
case OP_LFP:
|
|
||||||
case OP_IJMP:
|
case OP_IJMP:
|
||||||
case OP_TAIL:
|
case OP_TAIL:
|
||||||
case OP_TAIL_K:
|
case OP_TAIL_K:
|
||||||
|
@ -237,15 +236,17 @@ void JitCompiler::Setup()
|
||||||
int offsetS = offsetF + (int)(sfunc->NumRegF * sizeof(double));
|
int offsetS = offsetF + (int)(sfunc->NumRegF * sizeof(double));
|
||||||
int offsetA = offsetS + (int)(sfunc->NumRegS * sizeof(FString));
|
int offsetA = offsetS + (int)(sfunc->NumRegS * sizeof(FString));
|
||||||
int offsetD = offsetA + (int)(sfunc->NumRegA * sizeof(void*));
|
int offsetD = offsetA + (int)(sfunc->NumRegA * sizeof(void*));
|
||||||
|
offsetExtra = (offsetD + (int)(sfunc->NumRegD * sizeof(int32_t)) + 15) & ~15;
|
||||||
|
|
||||||
auto vmregs = cc.newIntPtr();
|
vmframe = cc.newIntPtr();
|
||||||
cc.mov(vmregs, x86::ptr(stack)); // stack->Blocks
|
cc.mov(vmframe, x86::ptr(stack)); // stack->Blocks
|
||||||
cc.mov(vmregs, x86::ptr(vmregs, VMFrameStack::OffsetLastFrame())); // Blocks->LastFrame
|
cc.mov(vmframe, x86::ptr(vmframe, VMFrameStack::OffsetLastFrame())); // Blocks->LastFrame
|
||||||
cc.lea(params, x86::ptr(vmregs, offsetParams));
|
|
||||||
cc.lea(frameF, x86::ptr(vmregs, offsetF));
|
cc.lea(params, x86::ptr(vmframe, offsetParams));
|
||||||
cc.lea(frameS, x86::ptr(vmregs, offsetS));
|
cc.lea(frameF, x86::ptr(vmframe, offsetF));
|
||||||
cc.lea(frameA, x86::ptr(vmregs, offsetA));
|
cc.lea(frameS, x86::ptr(vmframe, offsetS));
|
||||||
cc.lea(frameD, x86::ptr(vmregs, offsetD));
|
cc.lea(frameA, x86::ptr(vmframe, offsetA));
|
||||||
|
cc.lea(frameD, x86::ptr(vmframe, offsetD));
|
||||||
|
|
||||||
for (int i = 0; i < sfunc->NumRegD; i++)
|
for (int i = 0; i < sfunc->NumRegD; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,7 @@ void JitCompiler::EmitLKP_R()
|
||||||
|
|
||||||
void JitCompiler::EmitLFP()
|
void JitCompiler::EmitLFP()
|
||||||
{
|
{
|
||||||
I_FatalError("EmitLFP not implemented\n");
|
cc.lea(regA[A], asmjit::x86::ptr(vmframe, offsetExtra));
|
||||||
}
|
}
|
||||||
|
|
||||||
void JitCompiler::EmitMETA()
|
void JitCompiler::EmitMETA()
|
||||||
|
|
|
@ -95,6 +95,8 @@ private:
|
||||||
asmjit::X86Gp numret;
|
asmjit::X86Gp numret;
|
||||||
asmjit::X86Gp exceptInfo;
|
asmjit::X86Gp exceptInfo;
|
||||||
|
|
||||||
|
int offsetExtra;
|
||||||
|
asmjit::X86Gp vmframe;
|
||||||
asmjit::X86Gp frameD;
|
asmjit::X86Gp frameD;
|
||||||
asmjit::X86Gp frameF;
|
asmjit::X86Gp frameF;
|
||||||
asmjit::X86Gp frameS;
|
asmjit::X86Gp frameS;
|
||||||
|
|
Loading…
Reference in a new issue