Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix csrrwi instruction behavior according to risc-v spec #10

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

feathertw
Copy link
Contributor

No description provided.

@jserv
Copy link
Contributor

jserv commented Jan 6, 2022

Can you quote from RISC-V privileged instruction in git commit message? The instruction format should be mentioned and explained. You don't have to re-create the new issues. Instead, use git commit --amend to rework and then do git push --force.

@jserv
Copy link
Contributor

jserv commented Jan 6, 2022

Also, append Close #7 at the end of git commit message.

@feathertw
Copy link
Contributor Author

I add more information into the commit log and then git push -f it

Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Please read this carefully: https://dev.to/thelogeshwaran/how-to-write-good-commit-messages-714

  • Wrap lines at 72 characters

Don't mention "Issue #7" in the subject of git commit message.

Refer to RISC-V Unprivileged ISA Version 20191213 9.1 CSR Instructions

----------------------------------------------------------------------
| 31                 20|19       15|14       12|11       7|6        0|
|         csr          |    rs1    |   funct3  |    rd    |  opcode  |
|     source/dest      | uimm[4:0] |   CSRRWI  |   dest   |  SYSTEM  |
----------------------------------------------------------------------

CSRRWI behavior likes below and it needs to work atomically

x[rd] = CSRs[csr]; CSRs[csr] = uimm

The uimm is equal to rs1's index, instead of rs1's register value

Close sysprog21#7
@jserv jserv merged commit efecd83 into sysprog21:master Jan 6, 2022
@jserv
Copy link
Contributor

jserv commented Jan 6, 2022

Thank @feathertw for contributing!

@feathertw
Copy link
Contributor Author

My pleasure!

vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants