From: Dmitry Selyutin Date: Thu, 1 Sep 2022 14:20:02 +0000 (+0300) Subject: pagereader: skip empty dynamic and static operands X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8badcdabc02bdc9c48b00f49a691088961a91ee;p=openpower-isa.git pagereader: skip empty dynamic and static operands --- diff --git a/src/openpower/decoder/pseudo/pagereader.py b/src/openpower/decoder/pseudo/pagereader.py index 79e47597..52632858 100644 --- a/src/openpower/decoder/pseudo/pagereader.py +++ b/src/openpower/decoder/pseudo/pagereader.py @@ -271,12 +271,14 @@ class ISA: (dynamic, _, rest) = map(str.strip, rest.partition(" ")) if regex_dynamic.match(dynamic) is None and dynamic: raise IOError(f"{l!r}: {dynamic!r}") - opcode.append(dynamic.split(",")) + if dynamic: + opcode.append(dynamic.split(",")) static = rest if regex_static.match(static) is None and static: raise IOError(f"{l!r}: {static!r}") - opcode.extend(static[1:-1].split(" ")) + if static: + opcode.extend(static[1:-1].split(" ")) opcodes.append(opcode)