From f8badcdabc02bdc9c48b00f49a691088961a91ee Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 1 Sep 2022 17:20:02 +0300 Subject: [PATCH] pagereader: skip empty dynamic and static operands --- src/openpower/decoder/pseudo/pagereader.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.30.2