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

“amoxor.d” instruction does not trigger an exception when accessing an invalid memory address #211

Open
fly-1011 opened this issue Sep 19, 2024 · 1 comment

Comments

@fly-1011
Copy link

Bug Description:

When executing the amoxor.d a1, s4, (s4) instruction, a discrepancy was observed between the behavior of Spike and NutShell processors. Specifically, when the value of register s4 was 0, the mcause values differed.

According to the RISC-V specification, a Store/AMO Access Fault should occur when performing an atomic operation on an invalid address (in this case, s4 = 0). However, NutShell fails to trigger this fault, resulting in inconsistent behavior compared to Spike.

Spike: mcause = 7, indicating a Store/AMO Access Fault.
NutShell: mcause = 0, meaning no exception was triggered.
image

Screenshots

image
image
image

@fly-1011
Copy link
Author

The information for debugging using spike is as follows:
image

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

No branches or pull requests

1 participant