From: Jacob Lifshay Date: Fri, 21 Apr 2023 03:13:57 +0000 (-0700) Subject: add EXTZ since it's in PowerISA v3.1B (see lbz for an example) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=679408fbd0d5c12c5cb71dfcc3f860574c2c0172;p=openpower-isa.git add EXTZ since it's in PowerISA v3.1B (see lbz for an example) --- diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index c009431d..76dad8a2 100644 --- 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 """