Added 'trace' option
This commit is contained in:
@@ -676,8 +676,11 @@ void cpu_loop(rv32_cpu_t* cpu)
|
||||
instruction_t instruction;
|
||||
cpu_decode(raw_instruction, &instruction);
|
||||
|
||||
printf("0x%x: ", cpu->pc);
|
||||
cpu_print_instruction(&instruction);
|
||||
if(trace)
|
||||
{
|
||||
printf("0x%x: ", cpu->pc);
|
||||
cpu_print_instruction(&instruction);
|
||||
}
|
||||
|
||||
// Execute
|
||||
cpu_execute(cpu, &instruction);
|
||||
|
Reference in New Issue
Block a user