From c57bdaa03373688f76703d20d6df5e0dc4a21eb5 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Thu, 17 Mar 2016 12:51:58 -0700 Subject: [PATCH] Do a better job checking CSR functionality. --- tests/gdbserver.py | 21 ++++++++++++++++++--- tests/regs.s | 3 ++- tests/testlib.py | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/tests/gdbserver.py b/tests/gdbserver.py index 16af626..b5363e6 100755 --- a/tests/gdbserver.py +++ b/tests/gdbserver.py @@ -53,7 +53,9 @@ class DebugTest(unittest.TestCase): self.assertIn(reg, output) # mcpuid is one of the few registers that should have the high bit set # (for rv64). - self.assertRegexpMatches(output, ".*mcpuid *0x80") + # Leave this commented out until gdb and spike agree on the encoding of + # mcpuid (which is going to be renamed to misa in any case). + #self.assertRegexpMatches(output, ".*mcpuid *0x80") # The time register should always be changing. last_time = None @@ -85,15 +87,18 @@ class RegsTest(unittest.TestCase): self.gdb.command("p $pc=write_regs") for i, r in enumerate(regs): - self.gdb.command("p $%s=%d" % (r, i*0xdeadbeef+17)) + self.gdb.command("p $%s=%d" % (r, (0xdeadbeef<