From: Dmitry Selyutin Date: Tue, 16 Aug 2022 18:43:26 +0000 (+0300) Subject: pysvp64dis: dump to output file; use explicit arguments X-Git-Tag: sv_maxu_works-initial~60 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f6d44138b5ad8ce0aa0220bf88c255ee97184f3;p=openpower-isa.git pysvp64dis: dump to output file; use explicit arguments --- diff --git a/src/openpower/sv/trans/pysvp64dis.py b/src/openpower/sv/trans/pysvp64dis.py index 6f8d4cf4..4bd056f9 100644 --- a/src/openpower/sv/trans/pysvp64dis.py +++ b/src/openpower/sv/trans/pysvp64dis.py @@ -111,11 +111,15 @@ def main(): type=_argparse.FileType("w"), default=_sys.stdout) parser.add_argument("-b", "--byteorder", type=ByteOrder, default=ByteOrder.LITTLE) + args = dict(vars(parser.parse_args())) + ifile = args["ifile"] + ofile = args["ofile"] + byteorder = args["byteorder"] - insns = load(**args) - for line in dump(insns, **args): - print(line) + insns = load(ifile, byteorder) + for line in dump(insns, byteorder): + print(line, file=ofile) if __name__ == "__main__":