From: Jacob Lifshay Date: Mon, 7 Aug 2023 23:02:51 +0000 (-0700) Subject: change to only support fully-split instructions (split pseudocode is still optional) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c7e8c6c1462578c28bc1b207a17a6ecaeadd9c0;p=openpower-isa.git change to only support fully-split instructions (split pseudocode is still optional) --- diff --git a/src/openpower/decoder/pseudo/pagereader.py b/src/openpower/decoder/pseudo/pagereader.py index 5f30b954..27fb5a05 100644 --- a/src/openpower/decoder/pseudo/pagereader.py +++ b/src/openpower/decoder/pseudo/pagereader.py @@ -101,7 +101,7 @@ class ISA: if not os.path.isdir(os.path.join(get_isa_dir(), pth)): log("warning, file not .mdwn, skipping", pth) continue - self.read_file(pth) + self.read_top_file(pth) continue # code which helped add in the keyword "Pseudo-code:" automatically rewrite = self.read_file_for_rewrite(pth) @@ -207,12 +207,39 @@ class ISA: return rewrite - def read_file(self, fname): + def read_top_file(self, fname): pagename = fname.split('.')[0] fname = os.path.join(get_isa_dir(), fname) with open(fname) as f: lines = f.readlines() + for lineno, line in enumerate(lines): + # look for HTML comment, if starting, skip line. + # XXX this is braindead! it doesn't look for the end + # so please put ending of comments on one line: + # + # + line = line.strip() + if line.startswith('