From 0315b420564bc0a6c80ec3bc2fa27037f0d787df Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 27 May 2021 10:04:50 +0100 Subject: [PATCH] add qemu gpr/fpr set/get --- src/openpower/simulator/qemu.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openpower/simulator/qemu.py b/src/openpower/simulator/qemu.py index 00d0efa8..bbd40514 100644 --- a/src/openpower/simulator/qemu.py +++ b/src/openpower/simulator/qemu.py @@ -123,6 +123,14 @@ class QemuController: def get_fpr(self, num): return self.get_register(num+32) + def set_gpr(self, reg, val): + self._rcache_trash('x %d' % reg) + self.gdb_eval('$r%d=%d' % (reg, pc)) + + def set_fpr(self, reg, val): + self._rcache_trash('x %d' % (reg+32) + self.gdb_eval('$fp%d=%d' % (reg, pc)) + def set_pc(self, pc): self._rcache_trash('x 64') self.gdb_eval('$pc=%d' % pc) -- 2.30.2