target/riscv: implement abstract command cache#1235
Conversation
5b975e0 to
cc7e5e3
Compare
|
@JanMatCodasip, @MarekVCodasip, could you please take a look? |
JanMatCodasip
left a comment
There was a problem hiding this comment.
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
JanMatCodasip
left a comment
There was a problem hiding this comment.
@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
JanMatCodasip
left a comment
There was a problem hiding this comment.
Overall this MR looks good. I will do one last proper review tomorrow.
ff8bb84 to
6bd4a06
Compare
JanMatCodasip
left a comment
There was a problem hiding this comment.
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
a7b5f42 to
a31a57f
Compare
en-sc
left a comment
There was a problem hiding this comment.
@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 <f.khaydari@syntacore.com>
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.
this MR actually adds a subtle UB , according to ubsan. cache->commands may be NULL (when cache>size == 0)
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