Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rotor' into rotor
Browse files Browse the repository at this point in the history
  • Loading branch information
ckirsch committed Jun 26, 2024
2 parents 7c83905 + 1991dae commit acda772
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tools/rotor_disassembly_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ def compare_objdump(riscv_reader: CodeReader, rotor_reader: CodeReader):
else:
# No => seems like whole instruction set is mismatched. Log error and exit
Logger.error("ERROR: Instruction sets are mismatched")
Logger.message("===== RISC-V =====")
Logger.header("===== RISC-V =====")
Logger.print_instruction_array(5, [*mismatching_instructions, riscv_curr])
Logger.message("===== Rotor =====")
Logger.header("===== Rotor =====")
print(rotor_curr)

print()
Expand Down Expand Up @@ -324,9 +324,9 @@ def compare_objdump(riscv_reader: CodeReader, rotor_reader: CodeReader):
else:
# No => seems like whole instruction set is mismatched. Log error and exit
Logger.error("Instruction sets are mismatched")
Logger.message("===== RISC-V =====")
Logger.header("===== RISC-V =====")
print(riscv_curr)
Logger.message("===== Rotor =====")
Logger.header("===== Rotor =====")
Logger.print_instruction_array(5, [*mismatching_instructions, rotor_curr])

print()
Expand All @@ -339,15 +339,15 @@ def compare_objdump(riscv_reader: CodeReader, rotor_reader: CodeReader):
# Opcode is different, this might indicate an unimplemented instruction or pseudoinstruction, or an unhandled compressed instruction
num_mismatched_opcode += 1
Logger.warning("PROBLEM: Instructions are not equal")
Logger.message("RISC-V - ", repr(riscv_curr))
Logger.message("ROTOR - ", repr(rotor_curr))
Logger.header("RISC-V - ", repr(riscv_curr))
Logger.header("ROTOR - ", repr(rotor_curr))
print()
elif riscv_curr != rotor_curr:
# Opcode is the same but operands are different, this is 100% a bug in Rotor operand printing!
num_mismatched_operands += 1
Logger.warning("PROBLEM: Operands are not equal")
Logger.message("RISC-V - ", repr(riscv_curr))
Logger.message("ROTOR - ", repr(rotor_curr))
Logger.header("RISC-V - ", repr(riscv_curr))
Logger.header("ROTOR - ", repr(rotor_curr))
print()

at_start = False
Expand Down

0 comments on commit acda772

Please sign in to comment.