From e4aebf4e0d6d5f444a5740810a84537a38593797 Mon Sep 17 00:00:00 2001 From: mohanson Date: Mon, 27 May 2024 01:18:07 +0800 Subject: [PATCH] 2024-05-27 01:18:07 --- src/instructions/execute.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/instructions/execute.rs b/src/instructions/execute.rs index 022aacc9..a899accd 100644 --- a/src/instructions/execute.rs +++ b/src/instructions/execute.rs @@ -1564,7 +1564,7 @@ pub fn execute(inst: Instruction, machine: &mut Mac) -> Result<(), let next_pc = machine .pc() .overflowing_add(&Mac::REG::from_u8(instruction_size)); - println!("{:?} {:?} {:?}", machine.pc().to_u64(), inst, ckb_vm_definitions::instructions::instruction_opcode_name(extract_opcode(inst))); + println!("{:?} {:?} {:?}", machine.pc().to_u64(), inst, ckb_vm_definitions::instructions::instruction_opcode_name(extract_opcode(inst))); machine.update_pc(next_pc); let r = execute_instruction(inst, machine); machine.commit_pc(); @@ -1580,7 +1580,14 @@ pub fn execute_with_thread( let next_pc = machine .pc() .overflowing_add(&Mac::REG::from_u8(instruction_size)); - println!("{:?} {:?} {:?}", machine.pc().to_u64(), inst, ckb_vm_definitions::instructions::instruction_opcode_name(extract_opcode(inst))); + { + println!("{:?} {:?} {:?}", machine.pc().to_u64(), inst, ckb_vm_definitions::instructions::instruction_opcode_name(extract_opcode(inst))); + let mut tmp = vec![0u64; 32]; + for i in 0..32 { + tmp[i] = machine.registers()[i].to_u64(); + } + println!("{:?}", tmp); + } machine.update_pc(next_pc); let r = thread(machine, inst); machine.commit_pc();