summaryrefslogtreecommitdiff
diff options
-rw-r--r--yjit/src/codegen.rs9
-rw-r--r--yjit/src/core.rs1
2 files changed, 8 insertions, 2 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs
index 3dbc589466..b4c6d7c941 100644
--- a/yjit/src/codegen.rs
+++ b/yjit/src/codegen.rs
@@ -387,7 +387,11 @@ fn gen_code_for_exit_from_stub(ocb: &mut OutlinedCb) -> CodePtr {
/// Generate an exit to return to the interpreter
fn gen_exit(exit_pc: *mut VALUE, ctx: &Context, asm: &mut Assembler) {
- asm.comment("exit to interpreter");
+ #[cfg(all(feature = "disasm", not(test)))]
+ {
+ let opcode = unsafe { rb_vm_insn_addr2opcode((*exit_pc).as_ptr()) };
+ asm.comment(&format!("exit to interpreter on {}", insn_name(opcode as usize)));
+ }
// Generate the code to exit to the interpreters
// Write the adjusted SP back into the CFP
@@ -769,7 +773,7 @@ pub fn gen_single_block(
gen_counter_incr!(asm, exec_instruction);
// Add a comment for the name of the YARV instruction
- asm.comment(&insn_name(opcode));
+ asm.comment(&format!("Insn: {}", insn_name(opcode)));
// If requested, dump instructions for debugging
if get_option!(dump_insns) {
@@ -4776,6 +4780,7 @@ fn gen_return_branch(
match shape {
BranchShape::Next0 | BranchShape::Next1 => unreachable!(),
BranchShape::Default => {
+ asm.comment("update cfp->jit_return");
asm.mov(Opnd::mem(64, CFP, RUBY_OFFSET_CFP_JIT_RETURN), Opnd::const_ptr(target0.raw_ptr()));
}
}
diff --git a/yjit/src/core.rs b/yjit/src/core.rs
index 71c9ae5a9e..9a796bcb87 100644
--- a/yjit/src/core.rs
+++ b/yjit/src/core.rs
@@ -2126,6 +2126,7 @@ pub fn defer_compilation(
set_branch_target(0, blockid, &next_ctx, &branch_rc, &mut branch, ocb);
// Call the branch generation function
+ asm.comment("defer_compilation");
asm.mark_branch_start(&branch_rc);
if let Some(dst_addr) = branch.get_target_address(0) {
gen_jump_branch(asm, dst_addr, None, BranchShape::Default);