From: Dmitry Selyutin Date: Tue, 25 Jan 2022 19:54:52 +0000 (+0000) Subject: sv_binutils: mark already visited instructions X-Git-Tag: sv_maxu_works-initial~530 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=308a2edb3b6253c2ede7abb6ae88383c4383ccdc;p=openpower-isa.git sv_binutils: mark already visited instructions --- diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 7c9244b4..68460763 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -380,6 +380,7 @@ ISA = _SVP64RM() FIELDS = {field.name:field for field in _dataclasses.fields(Record)} FIELDS.update({field.name:field for field in _dataclasses.fields(Entry)}) def parse(path, opcode_cls): + visited = set() for record in ISA.get_svp64_csv(path): opcode = opcode_cls(record.pop("opcode")) names = record.pop("comment").split("=")[-1] @@ -411,7 +412,10 @@ def parse(path, opcode_cls): record[key] = value - yield Entry(name=name, record=Record(**record)) + if name not in visited: + yield Entry(name=name, record=Record(**record)) + + visited.add(name) def main(codegen):