[Enhancement] Trace log needs improving
Created by: jrrk
ariane produces a tracelog trace_core_00_0.dasm, which may be converted to trace_core_00_0.dis using spike-dasm. I have found that the trace log disagrees with the disassembled binary in the sense that compressed instructions are shown post conversion:
disassembly:
0000000040000382 <_init>:
40000382: 00001517 auipc a0,0x1
40000386: 2c650513 addi a0,a0,710 # 40001648 <_bss>
4000038a: 00001617 auipc a2,0x1
4000038e: 30e60613 addi a2,a2,782 # 40001698 <_end>
40000392: 1101 addi sp,sp,-32
40000394: 8e09 sub a2,a2,a0
trace log:
88 0x40000382 M (0x00001517) auipc a0, 0x1
89 0x40000386 M (0x2c650513) addi a0, a0, 710
90 0x4000038a M (0x00001617) auipc a2, 0x1
91 0x4000038e M (0x30e60613) addi a2, a2, 782
92 0x40000392 M (0xfe010113) addi sp, sp, -32
93 0x40000394 M (0x40a60633) sub a2, a2, a0
also sometimes the expanded instruction is < 0xFFFF leading to an ambiguity for poor humans to get confused by:
40000068: 6319 lui t1,0x6
becomes:
65 0x40000068 M (0x00006337) lui t1, 0x6
In addition the PC counter log appears misaligned to those not in the know because 32-bit instructions are apparently fetched with a PC increment of 2.