From 4edf6dff28c2d2f8345cbd80cdbcb86f4b8f4b18 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 3 Sep 2022 18:43:29 +0100 Subject: [PATCH] complete markdown table --- src/openpower/decoder/power_table.py | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/openpower/decoder/power_table.py b/src/openpower/decoder/power_table.py index 03feb165..adf058b3 100644 --- a/src/openpower/decoder/power_table.py +++ b/src/openpower/decoder/power_table.py @@ -27,6 +27,12 @@ for insn in db: insns[str(insn.section.path)].append(insn) print (insn) +def maxme(num, s): + return s.ljust(num) + +def binmaxed(num, v): + return format(v, "0%db" % num) + # create one table def do_table(fname, insns, section): insns = insns[fname] @@ -50,6 +56,7 @@ def do_table(fname, insns, section): print ("op", insn.name, op) opcode_per_insn[insn.name] = opcode + maxnamelen = 0 for i in range(1<