Skip to content

Add Shlcofideleg support#1847

Open
demin-han wants to merge 1 commit intoriscv-software-src:masterfrom
demin-han:Shlcofideleg-support
Open

Add Shlcofideleg support#1847
demin-han wants to merge 1 commit intoriscv-software-src:masterfrom
demin-han:Shlcofideleg-support

Conversation

@demin-han
Copy link
Copy Markdown
Contributor

No description provided.

riscv/csrs.cc Outdated
reg_t generic_int_accessor_t::ip_read() const noexcept {
return (state->mip->read() & deleg_mask() & read_mask) >> shiftamt;
const reg_t val = state->mip->read() & deleg_mask() & read_mask;
return ((val & 0xfff) >> shiftamt) | (val & ~0xfff);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic constant 0xfff is not OK. Same comment applies throughout the rest of this file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic number removed in new commit

Signed-off-by: demin.han <demin.han@starfivetech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants