From: Dmitry Selyutin Date: Sat, 3 Sep 2022 10:09:30 +0000 (+0300) Subject: power_insn: support operands check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=33224818c1c0a72204f08f81bdd94bb332877897;p=openpower-isa.git power_insn: support operands check --- diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/decoder/power_insn.py index 2cc942dd..da843aa2 100644 --- a/src/openpower/decoder/power_insn.py +++ b/src/openpower/decoder/power_insn.py @@ -491,6 +491,9 @@ class Operands: def __iter__(self): yield from self.__operands + def __contains__(self, key): + return self.__getitem__(key) is not None + def __getitem__(self, key): for operand in self.__operands: if operand.name == key: