report log expected different qemu values rather than all of them
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 May 2021 10:35:11 +0000 (11:35 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 27 May 2021 10:35:11 +0000 (11:35 +0100)
src/openpower/decoder/isa/pypowersim.py

index 52074b8bcf0cc27423df3b0c5bad2bad98160195..788867ca6e8e4838ccb22c9adb2b23073e1a7d6d 100644 (file)
@@ -104,13 +104,15 @@ def qemu_register_compare(sim, qemu, regs, fprs):
     for reg in regs:
         qemu_val = qemu.get_gpr(reg)
         sim_val = sim.gpr(reg).value
-        log("expect %x got %x" % (qemu_val, sim_val))
+        if qemu_val != sim_val:
+            log("expect gpr %d %x got %x" % (gpr, qemu_val, sim_val))
         #self.assertEqual(qemu_val, sim_val,
         #                 "expect %x got %x" % (qemu_val, sim_val))
     for fpr in fprs:
         qemu_val = qemu.get_fpr(fpr)
         sim_val = sim.fpr(fpr).value
-        log("expect fpr %x got %x" % (qemu_val, sim_val))
+        if qemu_val != sim_val:
+            log("expect fpr %d %x got %x" % (fpr, qemu_val, sim_val))
         #self.assertEqual(qemu_val, sim_val,
         #                 "expect %x got %x" % (qemu_val, sim_val))
     #self.assertEqual(qcr, sim_cr)