-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement generic abstract command support cache #1232
Comments
In my opinion, this is a very good proposal. I agree with both the general idea and the proposed approach for implementation. |
fk-sc
added a commit
to fk-sc/riscv-openocd
that referenced
this issue
Mar 4, 2025
Implemented cache of unsupported abstract commands. It's purpose is to replace set of caching variables to one. So this commit provides one ac_not_supported_cache instead of abstract_read_csr_supported, abstract_write_csr_supported, abstract_read_fpr_supported, abstract_write_fpr_supported, has_aampostincrement. Dropped check for buggy aampostincrement Fixes riscv-collab#1232 Change-Id: I75cae1481841f2cd0393d6cc80f0d913fbe34294 Signed-off-by: Farid Khaydari <[email protected]>
fk-sc
added a commit
to fk-sc/riscv-openocd
that referenced
this issue
Mar 4, 2025
Implemented cache of unsupported abstract commands. It's purpose is to replace set of caching variables to one. So this commit provides one ac_not_supported_cache instead of abstract_read_csr_supported, abstract_write_csr_supported, abstract_read_fpr_supported, abstract_write_fpr_supported, has_aampostincrement. Dropped check for buggy aampostincrement Fixes riscv-collab#1232 Change-Id: I75cae1481841f2cd0393d6cc80f0d913fbe34294 Signed-off-by: Farid Khaydari <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The idea is similar to #928.
The issue
Currently, there are many target properties derived from abstract command being supported or not:
riscv-openocd/src/target/riscv/riscv-013.c
Lines 178 to 183 in f32f178
There are issues with the current approach, e.g.:
abstract_..._supported
for example. Current implementation assumes the support is the same across all the registers in a group.abstractcs.cmderr == not_supported
, notabstractcs.cmderr != none
before asserting that the support is missing. This is not currently done in some places, e.g.riscv-openocd/src/target/riscv/riscv-013.c
Lines 3791 to 3807 in f32f178
Proposed solution
bsearch()
in the array).abstractcs.cmderr
isnot_supported
.The text was updated successfully, but these errors were encountered: