Commit 81841073 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[liftoff] Add a few more code comments

Add a code comment for checking the maximum number of steps, and
disambiguate the different types of breakpoints.

R=thibaudm@chromium.org

Change-Id: I9be40461554948a61e81b3f9953cfc4475e52e54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985400
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75383}
parent 895e00c5
...@@ -990,6 +990,7 @@ class LiftoffCompiler { ...@@ -990,6 +990,7 @@ class LiftoffCompiler {
} }
} }
if (has_breakpoint) { if (has_breakpoint) {
CODE_COMMENT("breakpoint");
EmitBreakpoint(decoder); EmitBreakpoint(decoder);
// Once we emitted an unconditional breakpoint, we don't need to check // Once we emitted an unconditional breakpoint, we don't need to check
// function entry breaks any more. // function entry breaks any more.
...@@ -1023,12 +1024,14 @@ class LiftoffCompiler { ...@@ -1023,12 +1024,14 @@ class LiftoffCompiler {
// removed. Adding a dead breakpoint here ensures that the source // removed. Adding a dead breakpoint here ensures that the source
// position exists, and that the offset to the return address is the // position exists, and that the offset to the return address is the
// same as in the old code. // same as in the old code.
CODE_COMMENT("dead breakpoint");
Label cont; Label cont;
__ emit_jump(&cont); __ emit_jump(&cont);
EmitBreakpoint(decoder); EmitBreakpoint(decoder);
__ bind(&cont); __ bind(&cont);
} }
if (V8_UNLIKELY(max_steps_ != nullptr)) { if (V8_UNLIKELY(max_steps_ != nullptr)) {
CODE_COMMENT("check max steps");
LiftoffRegList pinned; LiftoffRegList pinned;
LiftoffRegister max_steps = __ GetUnusedRegister(kGpReg, {}); LiftoffRegister max_steps = __ GetUnusedRegister(kGpReg, {});
pinned.set(max_steps); pinned.set(max_steps);
...@@ -1064,7 +1067,6 @@ class LiftoffCompiler { ...@@ -1064,7 +1067,6 @@ class LiftoffCompiler {
} }
void EmitBreakpoint(FullDecoder* decoder) { void EmitBreakpoint(FullDecoder* decoder) {
CODE_COMMENT("breakpoint");
DCHECK(for_debugging_); DCHECK(for_debugging_);
source_position_table_builder_.AddPosition( source_position_table_builder_.AddPosition(
__ pc_offset(), SourcePosition(decoder->position()), true); __ pc_offset(), SourcePosition(decoder->position()), true);
......
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