diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-04-19 16:30:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 19:30:43 -0400 |
commit | 5fc11f306c6d38e46cc45f0ffabc5ea14084a11a (patch) | |
tree | 7f41ca2b212c15ac537ec67400ad4e955a5629f5 /yjit | |
parent | 2531bb0b66e8860b27c449d7815229b4763ab415 (diff) | |
download | ruby-5fc11f306c6d38e46cc45f0ffabc5ea14084a11a.tar.gz |
YJIT: Tweak asm comments (#7743)
Diffstat (limited to 'yjit')
-rw-r--r-- | yjit/src/codegen.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 599de226a4..a38dc769fa 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -802,8 +802,9 @@ pub fn gen_single_block( #[cfg(feature = "disasm")] if get_option_ref!(dump_disasm).is_some() { let blockid_idx = blockid.idx; - let chain_depth = if asm.ctx.get_chain_depth() > 0 { format!(", chain_depth: {}", asm.ctx.get_chain_depth()) } else { "".to_string() }; - asm.comment(&format!("Block: {} (ISEQ offset: {}{})", iseq_get_location(blockid.iseq, blockid_idx), blockid_idx, chain_depth)); + let chain_depth = if asm.ctx.get_chain_depth() > 0 { format!("(chain_depth: {})", asm.ctx.get_chain_depth()) } else { "".to_string() }; + asm.comment(&format!("Block: {} {}", iseq_get_location(blockid.iseq, blockid_idx), chain_depth)); + asm.comment(&format!("reg_temps: {:08b}", ctx.get_reg_temps().as_u8())); } // For each instruction to compile @@ -859,7 +860,7 @@ pub fn gen_single_block( gen_counter_incr!(asm, exec_instruction); // Add a comment for the name of the YARV instruction - asm.comment(&format!("Insn: {} (stack_size: {})", insn_name(opcode), asm.ctx.get_stack_size())); + asm.comment(&format!("Insn: {:04} {} (stack_size: {})", insn_idx, insn_name(opcode), asm.ctx.get_stack_size())); // If requested, dump instructions for debugging if get_option!(dump_insns) { |