get qemu FP regs correctly
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 2 Jun 2021 12:32:51 +0000 (13:32 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 2 Jun 2021 12:32:51 +0000 (13:32 +0100)
src/openpower/simulator/qemu.py

index a9eb295453b7c7584fca22d7524475c4353dde47..a00c5647618c32f1c19838934edd594625de9202 100644 (file)
@@ -26,7 +26,9 @@ def find_uint128(val):
     val = val.split("=")[1]
     val = val.split(',')[0].strip()
     val = int(val, 0)
-    return swap_order(val, 16)
+    val = swap_order(val, 16)
+    val = swap_order(val, 8)
+    return val
 
 
 class QemuController:
@@ -161,7 +163,7 @@ class QemuController:
         return self.get_register(num)
 
     def get_fpr(self, num):
-        return self.get_register(num+32)
+        return self.get_register(num+471)
 
     def set_gpr(self, reg, val):
         self._rcache_trash('x %d' % reg)