From 3063d862503a759976da93bd48a84945253efd04 Mon Sep 17 00:00:00 2001 From: mohanson Date: Mon, 27 May 2024 01:14:35 +0800 Subject: [PATCH] 2024-05-27 01:14:35 --- src/instructions/execute.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/instructions/execute.rs b/src/instructions/execute.rs index 69ccca61..a80757f5 100644 --- a/src/instructions/execute.rs +++ b/src/instructions/execute.rs @@ -1565,9 +1565,7 @@ pub fn execute(inst: Instruction, machine: &mut Mac) -> Result<(), .pc() .overflowing_add(&Mac::REG::from_u8(instruction_size)); machine.update_pc(next_pc); - - 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 r = execute_instruction(inst, machine); machine.commit_pc(); r @@ -1583,6 +1581,14 @@ pub fn execute_with_thread( .pc() .overflowing_add(&Mac::REG::from_u8(instruction_size)); machine.update_pc(next_pc); + { + 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); + } let r = thread(machine, inst); machine.commit_pc(); r