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 csrrc instruction behavior when rs1 is 0 #338

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

visitorckw
Copy link
Collaborator

According to the RISC-V specification, no write operation should occur when rs1 is equal to 0. The current implementation incorrectly clears all bits in the specified CSR.

Introduces a fix that ensures the csrrc instruction refrains from performing any write operation when rs1 is 0.

According to the RISC-V specification, no write operation should occur
when rs1 is equal to 0. The current implementation incorrectly clears
all bits in the specified CSR.

Introduces a fix that ensures the csrrc instruction refrains from
performing any write operation when rs1 is 0.
@jserv jserv merged commit a593b23 into sysprog21:master Jan 28, 2024
7 checks passed
@jserv
Copy link
Contributor

jserv commented Jan 28, 2024

Thank @visitorckw for contributing!

@visitorckw visitorckw deleted the fix-csrrc branch January 28, 2024 22:26
vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Fix csrrc instruction behavior when rs1 is 0
# 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