""" extends sign bit out from current MSB to all 256 bits
     """
     assert isinstance(value, SelectableInt)
-    return SelectableInt(exts(value.value, value.bits) & ((1 << 256)-1), 256)
+    return exts(value.value, value.bits)
 
 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)
-            self.gpr[regnum] = output.narrow(64)
+            if isinstance(output, int):
+                output = SelectableInt(output, 64)
+            self.gpr[regnum] = output
 
 
 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 import ISA
+from soc.decoder.isa.all import ISA
 
 
 class Register: