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:
b650b32
)
power_insn: fix Fields methods
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 30 Aug 2022 08:47:44 +0000
(11:47 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Tue, 30 Aug 2022 10:02:21 +0000
(13:02 +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 1f93c76b67094897282d8053f3beee8b3c3ab244..5949db38482965f9bc855dabe185479732ea49e1 100644
(file)
--- a/
src/openpower/decoder/power_insn.py
+++ b/
src/openpower/decoder/power_insn.py
@@
-396,14
+396,14
@@
class Fields:
def __repr__(self):
return repr(self.__mapping)
+ def __iter__(self):
+ yield from self.__mapping.items()
+
def __contains__(self, key):
return self.__mapping.__contains__(key)
def __getitem__(self, key):
- return self.__mapping.__getitem__(key)
-
- def get(self, key, default):
- return self.__mapping.get(key, default)
+ return self.__mapping.get(key, None)
@_functools.total_ordering