Handle opcodes returning EXTS() results
[soc.git] / src / soc / decoder / isa / caller.py
index 835c9b48e011ee160cc1ae252e8d375fccdb7bb7..c60bdfc877f5f484dac81f6c81e19d05e6a2d7fd 100644 (file)
@@ -152,8 +152,8 @@ class ISACaller:
             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)
+                if output.bits > 64:
+                    output = SelectableInt(output.value, 64)
                 self.gpr[regnum] = output