diff --git a/src/debug/mips/debug-mips.cc b/src/debug/mips/debug-mips.cc index 30bf2159bc3c..d1ab6ec545f8 100644 --- a/src/debug/mips/debug-mips.cc +++ b/src/debug/mips/debug-mips.cc @@ -34,14 +34,12 @@ void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) { // - Restart the frame by calling the function. __ mov(fp, a1); __ lw(a1, MemOperand(fp, StandardFrameConstants::kFunctionOffset)); + __ lw(a0, MemOperand(fp, StandardFrameConstants::kArgCOffset)); // Pop return address and frame. __ LeaveFrame(StackFrame::INTERNAL); - __ lw(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); - __ lhu(a0, - FieldMemOperand(a0, SharedFunctionInfo::kFormalParameterCountOffset)); - __ mov(a2, a0); + __ li(a2, Operand(kDontAdaptArgumentsSentinel)); __ InvokeFunction(a1, a2, a0, JUMP_FUNCTION); } diff --git a/src/debug/mips64/debug-mips64.cc b/src/debug/mips64/debug-mips64.cc index f677a38ee250..7b8e9e974476 100644 --- a/src/debug/mips64/debug-mips64.cc +++ b/src/debug/mips64/debug-mips64.cc @@ -34,14 +34,12 @@ void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) { // - Restart the frame by calling the function. __ mov(fp, a1); __ Ld(a1, MemOperand(fp, StandardFrameConstants::kFunctionOffset)); + __ Ld(a0, MemOperand(fp, StandardFrameConstants::kArgCOffset)); // Pop return address and frame. __ LeaveFrame(StackFrame::INTERNAL); - __ Ld(a0, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); - __ Lhu(a0, - FieldMemOperand(a0, SharedFunctionInfo::kFormalParameterCountOffset)); - __ mov(a2, a0); + __ li(a2, Operand(kDontAdaptArgumentsSentinel)); __ InvokeFunction(a1, a2, a0, JUMP_FUNCTION); } diff --git a/src/wasm/baseline/mips/liftoff-assembler-mips.h b/src/wasm/baseline/mips/liftoff-assembler-mips.h index 967991220a35..6e19a8e41fdd 100644 --- a/src/wasm/baseline/mips/liftoff-assembler-mips.h +++ b/src/wasm/baseline/mips/liftoff-assembler-mips.h @@ -407,8 +407,16 @@ void LiftoffAssembler::LoadFromInstance(Register dst, int32_t offset, int size) { DCHECK_LE(0, offset); lw(dst, liftoff::GetInstanceOperand()); - DCHECK_EQ(4, size); - lw(dst, MemOperand(dst, offset)); + switch (size) { + case 1: + lb(dst, MemOperand(dst, offset)); + break; + case 4: + lw(dst, MemOperand(dst, offset)); + break; + default: + UNIMPLEMENTED(); + } } void LiftoffAssembler::LoadTaggedPointerFromInstance(Register dst, diff --git a/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/src/wasm/baseline/mips64/liftoff-assembler-mips64.h index 10fc0244f7d1..848adeb3d9bd 100644 --- a/src/wasm/baseline/mips64/liftoff-assembler-mips64.h +++ b/src/wasm/baseline/mips64/liftoff-assembler-mips64.h @@ -389,11 +389,18 @@ void LiftoffAssembler::LoadFromInstance(Register dst, int32_t offset, int size) { DCHECK_LE(0, offset); Ld(dst, liftoff::GetInstanceOperand()); - DCHECK(size == 4 || size == 8); - if (size == 4) { - Lw(dst, MemOperand(dst, offset)); - } else { - Ld(dst, MemOperand(dst, offset)); + switch (size) { + case 1: + Lb(dst, MemOperand(dst, offset)); + break; + case 4: + Lw(dst, MemOperand(dst, offset)); + break; + case 8: + Ld(dst, MemOperand(dst, offset)); + break; + default: + UNIMPLEMENTED(); } }