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:
39651ec
)
power_fields: support assignment to same class instance
author
Dmitry Selyutin
<ghostmansd@gmail.com>
Fri, 6 Jan 2023 17:22:53 +0000
(20:22 +0300)
committer
Dmitry Selyutin
<ghostmansd@gmail.com>
Sun, 15 Jan 2023 19:47:22 +0000
(22:47 +0300)
src/openpower/decoder/power_fields.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/power_fields.py
b/src/openpower/decoder/power_fields.py
index 856182f36de8e918c92418196d5a129a2869d5ef..b0f179099f3aa01036a7a760e7b4594bb40c3f9b 100644
(file)
--- a/
src/openpower/decoder/power_fields.py
+++ b/
src/openpower/decoder/power_fields.py
@@
-102,7
+102,8
@@
class Reference:
bits = range(bits.start, bits.stop)
bits = tuple(bits)
- if isinstance(value, int):
+ if isinstance(value, (int, self.__class__)):
+ value = int(value)
if value.bit_length() > len(bits):
raise OverflowError(value)
value = _SelectableInt(value=value, bits=len(bits))