8000 Show empty "instructions" as <empty> · insighio/micropython-esp32-ulp@6720584 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6720584

Browse files
committed
Show empty "instructions" as <empty>
These are likely memory left empty for storing data.
1 parent 278bbf0 commit 6720584

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/disassemble.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ def test_unknown_instruction():
5252
assert_decode_exception("10000001", 'Unknown instruction')
5353

5454

55+
@test
56+
def test_empty_instruction():
57+
assert_decode_exception("00000000", '<empty>')
58+
59+
5560
# All hex sequences were generated using our assembler.
5661
# Note: disassembled instructions always show field values according
5762
# to what is actually encoded into the binary instruction, not as per

tools/disassemble.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@
8989

9090

9191
def decode_instruction(i):
92+
if i == 0:
93+
raise Exception('<empty>')
94+
9295
ins = opcodes._end
9396
ins.all = i # abuse a struct to get opcode
9497

0 commit comments

Comments
 (0)
0