Handle opcodes returning EXTS() results
authorMichael Nolan <mtnolan2640@gmail.com>
Sun, 5 Apr 2020 19:25:51 +0000 (15:25 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Sun, 5 Apr 2020 19:25:51 +0000 (15:25 -0400)
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