From 308a2edb3b6253c2ede7abb6ae88383c4383ccdc Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 25 Jan 2022 19:54:52 +0000 Subject: [PATCH] sv_binutils: mark already visited instructions --- src/openpower/sv/sv_binutils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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): -- 2.30.2