Skip to content
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

Conflicting statements about xnxti write side effects #434

Open
Timmmm opened this issue Nov 29, 2024 · 0 comments
Open

Conflicting statements about xnxti write side effects #434

Timmmm opened this issue Nov 29, 2024 · 0 comments
Assignees
Labels
nxti v1.0 resolve for 1.0

Comments

@Timmmm
Copy link

Timmmm commented Nov 29, 2024

In the text:

Following the usual convention for CSR instructions, if the CSR instruction does not include write side effects (e.g., csrr t0, mnxti), then no state update on any CSR occurs.

But in the code:

if (rs1[4:0] != 0 && rs1 != x0) {  // Side-effects should occur.

These conflict because "the usual convention for CSR instructions" is NOT rs1[4:0] != 0 && rs1 != x0, it's just rs1 != x0.

For example

li x1, 0
csrrw x2, xnxti, x1

is considered to have write side effects by the normal convention, but apparently not by the pseudocode above.

hirooih added a commit to hirooih/riscv-fast-interrupt that referenced this issue Jan 5, 2025
Regarding the definition of xnxti CSR, several inconsistencies have been pointed out in riscv#395, riscv#415, riscv#433, and riscv#434.
This PR attempts to resolve them.

Signed-off-by: Hiroo HAYASHI <[email protected]>
@jb-brelot-nxp jb-brelot-nxp self-assigned this Jan 6, 2025
@jb-brelot-nxp jb-brelot-nxp added v1.0 resolve for 1.0 nxti labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nxti v1.0 resolve for 1.0
Projects
None yet
Development

No branches or pull requests

2 participants