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

Acquire and release instructions have a bug #361

Open
AFOliveira opened this issue Dec 18, 2024 · 1 comment
Open

Acquire and release instructions have a bug #361

AFOliveira opened this issue Dec 18, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed

Comments

@AFOliveira
Copy link
Collaborator

AFOliveira commented Dec 18, 2024

Describe the bug
The bug is the aq/rl bit not correctly defined, its left empty in the encoding instead of being 0/1. This is due to my original parsing of instructions coming from riscv-opcodes db and not from the generated .json it creates.

I'm fixing this and I'll PR soon.

@AFOliveira AFOliveira added the bug Something isn't working label Dec 18, 2024
@AFOliveira AFOliveira self-assigned this Dec 18, 2024
@AFOliveira AFOliveira added help wanted Extra attention is needed and removed bug Something isn't working labels Dec 23, 2024
@AFOliveira
Copy link
Collaborator Author

Extending on this problem:

riscv-opcodes keeps acquire and release bits always as variable on atomic operations. This is compliant with the ISA standard description of this instructions:
image

However, LLVM is much more strict on these instructions, and separates them as, per example AMOADD.H - AQ/RL = 00 ---AMOADD.H.AQ - AQ/RL = 10 --- AMOADD.H.RL - AMOADD.H.RL = 01.

I think we could keep this as aq/rl variables for the purpose of the UDB being a DB and extend if we need, but since this caught my eye due to failing the #356 test, I want to ask for your opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants