projects
/
openpower-isa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c389a7
)
power_insn: support operands check
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Sat, 3 Sep 2022 10:09:30 +0000
(13:09 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Sat, 3 Sep 2022 18:41:28 +0000
(21:41 +0300)
src/openpower/decoder/power_insn.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/power_insn.py
b/src/openpower/decoder/power_insn.py
index 2cc942dd46e2bcc5fe07cb4786075d8b8f24c0d0..da843aa21481df3a615bf9253145ac2922b9ba3b 100644
(file)
--- 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: