From a56ccdc256e75defdc14e4263bfbff4e2bbebfa6 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Wed, 26 Apr 2017 09:17:15 -0700 Subject: [PATCH] Set FS before reading F registers --- debug/gdbserver.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 7220f93..029439e 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -80,6 +80,8 @@ class SimpleRegisterTest(GdbTest): self.gdb.command("p *((int*) 0x%x)=0x13" % self.target.ram) self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 4)) self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 8)) + self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 12)) + self.gdb.command("p *((int*) 0x%x)=0x13" % (self.target.ram + 16)) self.gdb.p("$pc=0x%x" % self.target.ram) class SimpleS0Test(SimpleRegisterTest): @@ -100,6 +102,8 @@ class SimpleT1Test(SimpleRegisterTest): class SimpleF18Test(SimpleRegisterTest): def check_reg(self, name): + self.gdb.p_raw("$mstatus=$mstatus | 0x00006000") + self.gdb.stepi() a = random.random() b = random.random() self.gdb.p_raw("$%s=%f" % (name, a)) -- 2.30.2