bizarre, GPR 3 is set by qemu to non-zero at startup.
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 1 Jun 2021 13:21:13 +0000 (14:21 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 1 Jun 2021 13:21:13 +0000 (14:21 +0100)
clear all GPRs: set to zero

src/openpower/simulator/qemu.py

index 9e1b6f6a732f550713d0361deb7243a28989360a..a9eb295453b7c7584fca22d7524475c4353dde47 100644 (file)
@@ -306,8 +306,7 @@ def run_program(program, initial_mem=None, extra_break_addr=None,
     # upload regs
     if initial_regs:
         for i, reg in enumerate(initial_regs):
-            if reg != 0:
-                q.set_gpr(i, reg)
+            q.set_gpr(i, reg)
     if initial_fprs:
         if isinstance(initial_fprs, dict):
             for i, reg in initial_fprs.items():