mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1169214: IonMonkey - Part 3: Add the x64 shared stub helpers, r=jandem
This commit is contained in:
parent
c56b115ccc
commit
ecb6082cae
@ -92,7 +92,15 @@ EmitBaselineTailCallVM(JitCode* target, MacroAssembler& masm, uint32_t argSize)
|
||||
inline void
|
||||
EmitIonTailCallVM(JitCode* target, MacroAssembler& masm, uint32_t stackSize)
|
||||
{
|
||||
MOZ_CRASH("Not implemented yet.");
|
||||
masm.movq(Operand(esp, stackSize), ScratchReg);
|
||||
masm.shrq(Imm32(FRAMESIZE_SHIFT), ScratchReg);
|
||||
masm.addq(Imm32(stackSize + JitStubFrameLayout::Size() - sizeof(intptr_t)), ScratchReg);
|
||||
|
||||
// Push frame descriptor and perform the tail call.
|
||||
masm.makeFrameDescriptor(ScratchReg, JitFrame_IonJS);
|
||||
masm.push(ScratchReg);
|
||||
masm.push(ICTailCallReg);
|
||||
masm.jmp(target);
|
||||
}
|
||||
|
||||
inline void
|
||||
@ -118,7 +126,16 @@ EmitBaselineCallVM(JitCode* target, MacroAssembler& masm)
|
||||
inline void
|
||||
EmitIonCallVM(JitCode* target, size_t stackSlots, MacroAssembler& masm)
|
||||
{
|
||||
MOZ_CRASH("Not implemented yet.");
|
||||
uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), JitFrame_IonStub);
|
||||
masm.Push(Imm32(descriptor));
|
||||
masm.call(target);
|
||||
|
||||
// Remove rest of the frame left on the stack. We remove the return address
|
||||
// which is implicitly poped when returning.
|
||||
size_t framePop = sizeof(ExitFrameLayout) - sizeof(void*);
|
||||
|
||||
// Pop arguments from framePushed.
|
||||
masm.implicitPop(stackSlots * sizeof(void*) + framePop);
|
||||
}
|
||||
|
||||
// Size of vales pushed by EmitEnterStubFrame.
|
||||
@ -152,9 +169,11 @@ EmitBaselineEnterStubFrame(MacroAssembler& masm, Register)
|
||||
}
|
||||
|
||||
inline void
|
||||
EmitIonEnterStubFrame(MacroAssembler& masm, Register scratch)
|
||||
EmitIonEnterStubFrame(MacroAssembler& masm, Register)
|
||||
{
|
||||
MOZ_CRASH("Not implemented yet.");
|
||||
masm.pop(ICTailCallReg);
|
||||
masm.push(ICTailCallReg);
|
||||
masm.push(ICStubReg);
|
||||
}
|
||||
|
||||
inline void
|
||||
@ -186,7 +205,8 @@ EmitBaselineLeaveStubFrame(MacroAssembler& masm, bool calledIntoIon = false)
|
||||
inline void
|
||||
EmitIonLeaveStubFrame(MacroAssembler& masm)
|
||||
{
|
||||
MOZ_CRASH("Not implemented yet.");
|
||||
masm.pop(ICStubReg);
|
||||
masm.pop(ICTailCallReg);
|
||||
}
|
||||
|
||||
inline void
|
||||
|
Loading…
Reference in New Issue
Block a user