-
Notifications
You must be signed in to change notification settings - Fork 365
target/riscv: implement abstract command cache #1235
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
Conversation
5b975e0 to
cc7e5e3
Compare
|
@JanMatCodasip, @MarekVCodasip, could you please take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this improvement. Overall, the code looks all right. I have found several things to address, though. Could you please check my comments.
13ade68 to
0267349
Compare
0267349 to
272c514
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fk-sc thank you for addressing the findings so far.
I came across few more things - if you can please look at them.
272c514 to
4e0f011
Compare
946330b to
ff8bb84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this MR looks good. I will do one last proper review tomorrow.
ff8bb84 to
6bd4a06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, this looks fine. I am sending my last batch of comments, mostly it is minor coding stuff.
I do not expect to have any more comments than that.
e7ae250 to
a7b5f42
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you.
a7b5f42 to
a31a57f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JanMatCodasip, @fk-sc, I've re-opened some of the discussions.
IMHO, the suggested improvement to abstract memory accesses should not be implemented in the same commit. Please, take a look.
a31a57f to
bf43598
Compare
…nsupported 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: I9690d9d79e3d1f593b63740b989074dcf0285637 Signed-off-by: Farid Khaydari <[email protected]>
bf43598 to
ab97974
Compare
|
|
||
| static bool ac_cache_contains(const struct ac_cache *cache, uint32_t command) | ||
| { | ||
| return bsearch(&command, cache->commands, cache->size, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this MR actually adds a subtle UB , according to ubsan. cache->commands may be NULL (when cache>size == 0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MR with the fix: #1297
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 #1232
Change-Id: I75cae1481841f2cd0393d6cc80f0d913fbe34294