Skip to content

Commit a4df710

Browse files
committed
Add reservation_set to register display, explicitly display null in format procedures
1 parent 9d24f08 commit a4df710

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

src/tools/registers.mlog

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ loop:
131131
read __etext CPU "__etext"
132132
read decode_time CPU "decode_duration"
133133
op floor decode_time decode_time
134+
read reservation_set CPU "reservation_set"
134135

135136
read MEMORY_X CPU "MEMORY_X"
136137
read MEMORY_Y CPU "MEMORY_Y"
@@ -352,21 +353,26 @@ loop:
352353
draw print 7 300 topLeft
353354
drawflush DISPLAY
354355

355-
print "@ipt = {0}\n"
356+
print "@ipt = {0}\n"
356357
format ipt
357358

358-
print "state = {0}\n"
359+
print "state = {0}\n"
359360
format state
360361
format ipt
361362

362-
print "__etext = {0}\n"
363+
print "__etext = {0}\n"
363364
set n __etext
364365
op add ret @counter 1
365366
jump format_hex always
366367

367-
print "decode_time = {0} ms\n\n"
368+
print "decode_time = {0} ms\n"
368369
format decode_time
369370

371+
print "reservation_set = {0}\n\n"
372+
set n reservation_set
373+
op add ret @counter 1
374+
jump format_hex always
375+
370376
print "pc = {0}\n"
371377
set n pc
372378
op add ret @counter 1
@@ -393,6 +399,7 @@ loop:
393399
jump loop always
394400

395401
format_hex:
402+
jump format_null strictEqual n null
396403
op floor n n
397404
op and n n 0xffffffff # in case we get a negative value
398405
format_hex__loop:
@@ -437,6 +444,7 @@ format_hex__next:
437444
set @counter ret
438445

439446
format_bin:
447+
jump format_null strictEqual n null
440448
set i 0
441449
op floor n n
442450
op and n n 0xffffffff
@@ -455,6 +463,7 @@ format_bin__next:
455463
set @counter ret
456464

457465
format_op_id:
466+
jump format_null strictEqual n null
458467
jump format_op_id__unknown lessThan n 0
459468
jump format_op_id__unknown greaterThan n 64
460469
op mul n n 2
@@ -527,6 +536,10 @@ format_op_id:
527536
format_op_id__unknown:
528537
format n; set @counter ret
529538

539+
format_null:
540+
format "null"
541+
set @counter ret
542+
530543
# get the variable name in CSRS for the specified CSR
531544
# csr -> variable
532545
access_csr:

0 commit comments

Comments
 (0)