From 439b92e4337489247fc198145eabfa9e5b9a8422 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Mon, 28 Jun 2021 00:37:14 +0200 Subject: [PATCH] :art: Improve Dump --- include/opcode.h | 1 + scripts/opcode.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/include/opcode.h b/include/opcode.h index e0ef81b6..426c2adf 100644 --- a/include/opcode.h +++ b/include/opcode.h @@ -406,6 +406,7 @@ ANN static inline void dump_opcodes(const VM_Code code) { m_uint j = 0; for(m_uint i = 0; i < vector_size(&code->instr); i++) { const Instr instr = (Instr)vector_at(&code->instr, i); + if (instr->opcode == eNoOp) continue; switch(instr->opcode) { case eRegSetImm: gw_out("{Y}┃{0}{-}% 4lu{0}: RegSetImm ", j); diff --git a/scripts/opcode.sh b/scripts/opcode.sh index 1d79cd14..f3429940 100644 --- a/scripts/opcode.sh +++ b/scripts/opcode.sh @@ -55,6 +55,7 @@ echo " gw_out(\"{Y}┏━━━━┓{0}{-Y} {+}%s{0}\n{Y}┃{0}\n\", code->nam echo " m_uint j = 0;" echo " for(m_uint i = 0; i < vector_size(&code->instr); i++) {" echo " const Instr instr = (Instr)vector_at(&code->instr, i);" +echo " if (instr->opcode == eNoOp) continue;" echo " switch(instr->opcode) {" for info in ${list} do -- 2.43.0