From: Luke Kenneth Casson Leighton Date: Sat, 3 Sep 2022 17:43:29 +0000 (+0100) Subject: complete markdown table X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4edf6dff28c2d2f8345cbd80cdbcb86f4b8f4b18;p=openpower-isa.git complete markdown table --- 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<