diff options
author | Tim Newsome <tim@sifive.com> | 2022-10-07 10:25:19 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2022-10-07 10:25:19 -0700 |
commit | 1112fd33a41f130e374b8456859cc818a426782d (patch) | |
tree | 0a4b9001d83046f228e997ff44256084c53734f1 /riscv | |
parent | d7edd7ac550dab81b84f2001793e04b663330658 (diff) | |
download | spike-1112fd33a41f130e374b8456859cc818a426782d.zip spike-1112fd33a41f130e374b8456859cc818a426782d.tar.gz spike-1112fd33a41f130e374b8456859cc818a426782d.tar.bz2 |
Add --dm-no-abstract-fpr option.
Previously FPRs could always be accessed using abstract commands. I need
this to get coverage of some OpenOCD code that I broke. (See
https://github.com/riscv/riscv-openocd/pull/745)
Diffstat (limited to 'riscv')
-rw-r--r-- | riscv/debug_module.cc | 2 | ||||
-rw-r--r-- | riscv/debug_module.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc index d297f14..f5c0c73 100644 --- a/riscv/debug_module.cc +++ b/riscv/debug_module.cc @@ -672,7 +672,7 @@ bool debug_module_t::perform_abstract_command() write32(debug_abstract, i++, csrw(S0, CSR_DSCRATCH0)); } - } else if (regno >= 0x1020 && regno < 0x1040) { + } else if (regno >= 0x1020 && regno < 0x1040 && config.support_abstract_fpr_access) { unsigned fprnum = regno - 0x1020; if (write) { diff --git a/riscv/debug_module.h b/riscv/debug_module.h index 8230557..8fb335d 100644 --- a/riscv/debug_module.h +++ b/riscv/debug_module.h @@ -19,6 +19,7 @@ typedef struct { unsigned abstract_rti; bool support_hasel; bool support_abstract_csr_access; + bool support_abstract_fpr_access; bool support_haltgroups; bool support_impebreak; } debug_module_config_t; |