Fix up some register stuff.
Now you can attach with gdb, and it'll attempt to read a register. That will fail because the core won't clear debug interrupt. Adding nops doesn't help this time.
This commit is contained in:
@@ -113,6 +113,10 @@ static uint32_t addi(unsigned int dest, unsigned int src, uint16_t imm)
|
||||
MATCH_ADDI;
|
||||
}
|
||||
|
||||
static uint32_t csrr(unsigned int rd, unsigned int csr) {
|
||||
return (csr << 20) | (rd << 7) | MATCH_CSRRS;
|
||||
}
|
||||
|
||||
/*
|
||||
static uint32_t li(unsigned int dest, uint16_t imm)
|
||||
{
|
||||
@@ -126,10 +130,6 @@ static uint32_t lui(unsigned int dest, uint32_t imm)
|
||||
MATCH_LUI;
|
||||
}
|
||||
|
||||
static uint32_t csrr(unsigned int rd, unsigned int csr) {
|
||||
return (csr << 20) | (rd << 7) | MATCH_CSRRS;
|
||||
}
|
||||
|
||||
static uint32_t fence_i(void)
|
||||
{
|
||||
return MATCH_FENCE_I;
|
||||
|
||||
Reference in New Issue
Block a user