add "short" argument (TODO pick better name) to pysvp64dis
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 9 Sep 2022 15:25:03 +0000 (16:25 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 9 Sep 2022 15:25:03 +0000 (16:25 +0100)
src/openpower/sv/trans/pysvp64dis.py

index 54dc16b5652ff7c4da7e79e7375a9e47d555e517..38b4017d05a6f7e9466b1a95affdc02673f7fd72 100644 (file)
@@ -50,10 +50,10 @@ def load(ifile, byteorder=ByteOrder.LITTLE, **_):
         yield insn
 
 
-def dump(insns, verbose, **_):
+def dump(insns, verbose, short=False, **_):
     db = _Database(_find_wiki_dir())
     for insn in insns:
-        yield from insn.disassemble(db=db, verbose=verbose)
+        yield from insn.disassemble(db=db, verbose=verbose, short=short)
 
 
 # this is the entry-point for the console-script pysvp64dis
@@ -67,6 +67,8 @@ def main():
         type=ByteOrder, default=ByteOrder.LITTLE)
     parser.add_argument("-v", "--verbose",
         action="store_true", default=False)
+    parser.add_argument("-s", "--short",
+        action="store_true", default=False)
     parser.add_argument("-l", "--log",
         action="store_true", default=False)