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:
edabfe2
)
add EXTZ since it's in PowerISA v3.1B (see lbz for an example)
author
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 21 Apr 2023 03:13:57 +0000
(20:13 -0700)
committer
Jacob Lifshay
<programmerjake@gmail.com>
Fri, 21 Apr 2023 03:13:57 +0000
(20:13 -0700)
src/openpower/decoder/helpers.py
patch
|
blob
|
history
diff --git
a/src/openpower/decoder/helpers.py
b/src/openpower/decoder/helpers.py
index c009431d7e3125245a0b3c5b466fd6a80a5a61d8..76dad8a2efbf614d8b82e35be8ad083006fd5f48 100644
(file)
--- a/
src/openpower/decoder/helpers.py
+++ b/
src/openpower/decoder/helpers.py
@@
-46,6
+46,14
@@
def EXTS(value):
return SelectableInt(exts(value.value, value.bits) & ((1 << 256)-1), 256)
+def EXTZ(value):
+ """ zero extend to 256 bits
+ """
+ if isinstance(value, SelectableInt):
+ value = value.value
+ return SelectableInt(value & ((1 << 256) - 1), 256)
+
+
def EXTS64(value):
""" extends sign bit out from current MSB to 64 bits
"""