""" extends sign bit out from current MSB to all 256 bits
"""
assert isinstance(value, SelectableInt)
- return exts(value.value, value.bits)
+ return SelectableInt(exts(value.value, value.bits) & ((1 << 256)-1), 256)
def EXTS64(value):
""" extends sign bit out from current MSB to 64 bits
for name, output in zip(output_names, results):
regnum = yield getattr(self.decoder, name)
print('writing reg %d' % regnum)
- if isinstance(output, int):
- output = SelectableInt(output, 64)
- self.gpr[regnum] = output
+ self.gpr[regnum] = output.narrow(64)
def inject():
from soc.decoder.isa.caller import ISACaller, inject
from soc.decoder.selectable_int import SelectableInt
from soc.decoder.orderedset import OrderedSet
-from soc.decoder.isa.all import ISA
+from soc.decoder.isa import ISA
class Register: