From d0057c850e3b0ef93e71af4a0fda990c89f6a1ca Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 3 Oct 2023 15:34:35 +0100 Subject: [PATCH] optional read of "Description" in pagereader.py --- src/openpower/decoder/pseudo/pagereader.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openpower/decoder/pseudo/pagereader.py b/src/openpower/decoder/pseudo/pagereader.py index d3f51cd5..be70f32e 100644 --- a/src/openpower/decoder/pseudo/pagereader.py +++ b/src/openpower/decoder/pseudo/pagereader.py @@ -86,6 +86,8 @@ def operands(opcode, desc): yield operand def get_indented_lines(lines): + """gets a set of indented lines, plus a blank line as termination + """ li = [] while lines: l = lines.pop(0).rstrip() @@ -330,6 +332,11 @@ class ISA: d['pcode'] = li d['extra_uninit_regs'] = extra_uninit_regs + # check if (temporarily) optional "Description" exists + if lines[0].startswith("Description:"): + l = lines.pop(0).rstrip() # skip "Description" + d['description'] = get_indented_lines(lines) + # "Special Registers Altered" expected l = lines.pop(0).rstrip() assert l.startswith("Special"), ("special not found %s" % l) -- 2.30.2