aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-09-21 13:19:15 +0200
committerClifford Wolf <clifford@clifford.at>2019-09-21 13:19:15 +0200
commit881f928e05dca9f1e750ff68793e5cc7653d7ccd (patch)
tree9051640d183267e1b93960efd9f921620c619bd7
parent392ee1dd91fc637b48b6fc778fc838ec11633ec7 (diff)
downloadpicorv32-881f928e05dca9f1e750ff68793e5cc7653d7ccd.tar.gz
picorv32-881f928e05dca9f1e750ff68793e5cc7653d7ccd.zip
Improve showtrace.py (and fix for new binutils)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r--showtrace.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/showtrace.py b/showtrace.py
index 60ffcd6..a5d1021 100644
--- a/showtrace.py
+++ b/showtrace.py
@@ -23,7 +23,8 @@ with open(trace_filename, "r") as f:
irq_active = (raw_data & 0x800000000) != 0
is_addr = (raw_data & 0x200000000) != 0
is_branch = (raw_data & 0x100000000) != 0
- info = "%s %s%08x" % ("IRQ" if irq_active else " ", ">" if is_branch else "@" if is_addr else "=", payload)
+ info = "%s %s%08x" % ("IRQ" if irq_active or last_irq else " ",
+ ">" if is_branch else "@" if is_addr else "=", payload)
if irq_active and not last_irq:
pc = 0x10
@@ -33,7 +34,8 @@ with open(trace_filename, "r") as f:
insn_opcode, insn_desc = insns[pc]
opname = insn_desc.split()[0]
- if insn_desc.startswith("custom0 0,0,0,2"):
+ if insn_opcode == 0x0400000b:
+ insn_desc = "retirq"
opname = "retirq"
if is_branch and opname not in ["j", "jal", "jr", "jalr", "ret", "retirq",