Skip to content

Commit

Permalink
2024-05-27 01:18:07
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed May 26, 2024
1 parent 6b5fae1 commit e4aebf4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/instructions/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@ pub fn execute<Mac: Machine>(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();
Expand All @@ -1580,7 +1580,14 @@ pub fn execute_with_thread<Mac: Machine>(
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();
Expand Down

0 comments on commit e4aebf4

Please sign in to comment.