зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1169214: IonMonkey - Part 2: Add the x86 shared stub helpers, r=jandem
This commit is contained in:
Родитель
def4bc8c55
Коммит
31fb4f7314
|
@ -95,7 +95,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.movl(Operand(esp, stackSize), eax);
|
||||
masm.shrl(Imm32(FRAMESIZE_SHIFT), eax);
|
||||
masm.addl(Imm32(stackSize + JitStubFrameLayout::Size() - sizeof(intptr_t)), eax);
|
||||
|
||||
masm.makeFrameDescriptor(eax, JitFrame_IonJS);
|
||||
masm.push(eax);
|
||||
masm.push(ICTailCallReg);
|
||||
|
||||
masm.jmp(target);
|
||||
}
|
||||
|
||||
inline void
|
||||
|
@ -121,7 +129,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.
|
||||
|
@ -159,7 +176,11 @@ EmitBaselineEnterStubFrame(MacroAssembler& masm, Register scratch)
|
|||
inline void
|
||||
EmitIonEnterStubFrame(MacroAssembler& masm, Register scratch)
|
||||
{
|
||||
MOZ_CRASH("Not implemented yet.");
|
||||
MOZ_ASSERT(scratch != ICTailCallReg);
|
||||
|
||||
masm.pop(ICTailCallReg);
|
||||
masm.push(ICTailCallReg);
|
||||
masm.push(ICStubReg);
|
||||
}
|
||||
|
||||
inline void
|
||||
|
@ -192,7 +213,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
|
||||
|
|
Загрузка…
Ссылка в новой задаче