Skip to content

Commit

Permalink
2024-05-27 01:14:35
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed May 26, 2024
1 parent 81e180c commit 3063d86
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/instructions/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1565,9 +1565,7 @@ pub fn execute<Mac: Machine>(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
Expand All @@ -1583,6 +1581,14 @@ pub fn execute_with_thread<Mac: Machine>(
.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
Expand Down

0 comments on commit 3063d86

Please sign in to comment.