зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1780723
- [loong64]Add PoppedFPJitEntry and fix some errors. r=jandem
Add PoppedFPJitEntry; Fix offset when push FrameType and ra in EmitBaselineTailCallVM; Fix FramePointer in BaselineFrame in generateEnterJIT. Differential Revision: https://phabricator.services.mozilla.com/D152489
This commit is contained in:
Родитель
775d68bc7e
Коммит
15ee4c4c7b
|
@ -37,11 +37,8 @@ inline void EmitBaselineTailCallVM(TrampolinePtr target, MacroAssembler& masm,
|
|||
// keep it there through the stub calls), but the VMWrapper code being
|
||||
// called expects the return address to also be pushed on the stack.
|
||||
MOZ_ASSERT(ICTailCallReg == ra);
|
||||
masm.subPtr(Imm32(sizeof(CommonFrameLayout)), StackPointer);
|
||||
masm.storePtr(ImmWord(MakeFrameDescriptor(FrameType::BaselineJS)),
|
||||
Address(StackPointer, CommonFrameLayout::offsetOfDescriptor()));
|
||||
masm.storePtr(
|
||||
ra, Address(StackPointer, CommonFrameLayout::offsetOfReturnAddress()));
|
||||
masm.pushFrameDescriptor(FrameType::BaselineJS);
|
||||
masm.push(ra);
|
||||
|
||||
masm.jump(target);
|
||||
}
|
||||
|
|
|
@ -216,8 +216,11 @@ void JitRuntime::generateEnterJIT(JSContext* cx, MacroAssembler& masm) {
|
|||
|
||||
// Reserve frame.
|
||||
Register framePtr = FramePointer;
|
||||
masm.subPtr(Imm32(BaselineFrame::Size()), StackPointer);
|
||||
masm.movePtr(StackPointer, framePtr);
|
||||
masm.subPtr(Imm32(BaselineFrame::Size()), StackPointer);
|
||||
|
||||
Register framePtrScratch = regs.takeAny();
|
||||
masm.movePtr(sp, framePtrScratch);
|
||||
|
||||
// Reserve space for locals and stack values.
|
||||
masm.as_slli_d(scratch, numStackValues, 3);
|
||||
|
@ -244,8 +247,8 @@ void JitRuntime::generateEnterJIT(JSContext* cx, MacroAssembler& masm) {
|
|||
using Fn = bool (*)(BaselineFrame * frame, InterpreterFrame * interpFrame,
|
||||
uint32_t numStackValues);
|
||||
masm.setupUnalignedABICall(scratch);
|
||||
masm.passABIArg(FramePointer); // BaselineFrame
|
||||
masm.passABIArg(OsrFrameReg); // InterpreterFrame
|
||||
masm.passABIArg(framePtrScratch); // BaselineFrame
|
||||
masm.passABIArg(OsrFrameReg); // InterpreterFrame
|
||||
masm.passABIArg(numStackValues);
|
||||
masm.callWithABI<Fn, jit::InitBaselineFrameForOsr>(
|
||||
MoveOp::GENERAL, CheckUnsafeCallWithABI::DontCheckHasExitFrame);
|
||||
|
@ -258,7 +261,6 @@ void JitRuntime::generateEnterJIT(JSContext* cx, MacroAssembler& masm) {
|
|||
|
||||
Label error;
|
||||
masm.freeStack(ExitFrameLayout::SizeWithFooter());
|
||||
masm.addPtr(Imm32(BaselineFrame::Size()), framePtr);
|
||||
masm.branchIfFalseBool(ReturnReg, &error);
|
||||
|
||||
// If OSR-ing, then emit instrumentation for setting lastProfilerFrame
|
||||
|
@ -352,7 +354,7 @@ void JitRuntime::generateInvalidator(MacroAssembler& masm, Label* bailoutTail) {
|
|||
masm.callWithABI<Fn, InvalidationBailout>(
|
||||
MoveOp::GENERAL, CheckUnsafeCallWithABI::DontCheckOther);
|
||||
|
||||
masm.loadPtr(Address(StackPointer, 0), a2);
|
||||
masm.pop(a2);
|
||||
|
||||
// Pop the machine state and the dead frame.
|
||||
masm.moveToStackPtr(FramePointer);
|
||||
|
|
|
@ -395,6 +395,7 @@ static const unsigned PushedRetAddr = 8;
|
|||
static const unsigned PushedFP = 16;
|
||||
static const unsigned SetFP = 20;
|
||||
static const unsigned PoppedFP = 4;
|
||||
static const unsigned PoppedFPJitEntry = 0;
|
||||
#elif defined(JS_CODEGEN_NONE) || defined(JS_CODEGEN_WASM32)
|
||||
// Synthetic values to satisfy asserts and avoid compiler warnings.
|
||||
static const unsigned PushedRetAddr = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче