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

Store Conditional can retire successfully even if atomics are disabled #419

Closed
Timmmm opened this issue Feb 29, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Timmmm
Copy link
Collaborator

Timmmm commented Feb 29, 2024

/* NOTE: Currently, we only EA if address translation is successful. This may need revisiting. */
function clause execute (STORECON(aq, rl, rs2, rs1, width, rd)) = {
  if speculate_conditional () == false then {
    /* should only happen in rmem
     * rmem: allow SC to fail very early
     */
    X(rd) = zero_extend(0b1); RETIRE_SUCCESS
  } else {
    if haveAtomics() then {
      /* normal non-rmem case
       * rmem: SC is allowed to succeed (but might fail later)
       */

Surely speculate_conditional() should be inside if haveAtomics()?

@Timmmm Timmmm changed the title Store Conditional can retire successfully even if atomics are disabled: Store Conditional can retire successfully even if atomics are disabled May 7, 2024
@Timmmm Timmmm added the bug Something isn't working label May 7, 2024
@jordancarlin
Copy link
Contributor

@Timmmm I think this was resolved by #469 as the whole execute clause will only be reached if haveAtomics() is true now.

@Timmmm
Copy link
Collaborator Author

Timmmm commented May 22, 2024

Yes you're right. I think there are some other issues with it but i'll open a new issue for them.

@Timmmm Timmmm closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants