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

Check misalignment of AMOs before address translation #471

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

Timmmm
Copy link
Collaborator

@Timmmm Timmmm commented May 15, 2024

This is optional according to the spec - you can check afterwards. However

  1. it seems extremely unlikely that any real designs will do that for atomics, which (ignoring Zam which the model doesn't support yet), always have to be aligned, and
  2. the LR and SC instructions already check before address translation, so this wasn't even consistent.

Ideally in future this would be configurable.

This also includes a minor refactor to reuse the existing alignment checking code.

Copy link

github-actions bot commented May 15, 2024

Test Results

712 tests  ±0   712 ✅ ±0   0s ⏱️ ±0s
  6 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit e1dcef1. ± Comparison against base commit 7ff6d94.

♻️ This comment has been updated with latest results.

@Timmmm Timmmm force-pushed the user/timh/amo_alignment_check branch from fe750b6 to e4e09fb Compare May 21, 2024 13:46
This is optional according to the spec - you can check afterwards. However

1. it seems extremely unlikely that any real designs will do that for atomics, which (ignoring Zam which the model doesn't support yet), always have to be aligned, and
2. the LR and SC instructions already check before address translation, so this wasn't even consistent.

Ideally in future this would be configurable.

This also includes a minor refactor to reuse the existing alignment checking code.
@Timmmm Timmmm force-pushed the user/timh/amo_alignment_check branch from e4e09fb to e1dcef1 Compare June 11, 2024 20:49
@Timmmm
Copy link
Collaborator Author

Timmmm commented Jun 11, 2024

I'll merge this tomorrow if nobody has any objections...

@Timmmm Timmmm merged commit ba35af5 into riscv:master Jun 12, 2024
2 checks passed
ThinkOpenly pushed a commit to ThinkOpenly/sail-riscv that referenced this pull request Jul 3, 2024
This is optional according to the spec - you can check afterwards. However

1. it seems extremely unlikely that any real designs will do that for atomics, which (ignoring Zam which the model doesn't support yet), always have to be aligned, and
2. the LR and SC instructions already check before address translation, so this wasn't even consistent.

Ideally in future this would be configurable.
@Timmmm Timmmm deleted the user/timh/amo_alignment_check branch August 30, 2024 15:35
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

Successfully merging this pull request may close these issues.

5 participants