Commit 8f72f316 authored by Liu Yu's avatar Liu Yu Committed by Commit Bot

[mips][wasm][debug] Implement instrumentation breakpoint

Besides, fix extra arguments when restarting frame.

Port: 15f3392a
Port: 94b294b3

Change-Id: Iaf6b1d6b3eda0ea90ed651b22bb9bd871a5edb36
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2710207Reviewed-by: 's avatarZhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Auto-Submit: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#72882}
parent 5b245560
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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,
......
......@@ -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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment