output = self.gdb.command(cmd)
for reg in ('zero', 'ra', 'sp', 'gp', 'tp'):
assertIn(reg, output)
+ for line in output.splitlines():
+ assertRegexpMatches(line, r"^\S")
#TODO
# mcpuid is one of the few registers that should have the high bit set
# Disable physical memory protection by allowing U mode access to all
# memory.
self.gdb.p("$pmpcfg0=0xf") # TOR, R, W, X
- self.gdb.p("$pmpaddr0=0x%x" % ((self.hart.ram + self.hart.ram_size) >> 2))
+ self.gdb.p("$pmpaddr0=0x%x" %
+ ((self.hart.ram + self.hart.ram_size) >> 2))
# Leave the PC at _start, where the first 4 instructions should be
# legal in any mode.