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

force-amo: allowing AMOxxx instructions for riscv32imc #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romancardenas
Copy link
Contributor

The E310X atomic support is limited, as it only allows us to use AMO instructions, while LR/SC instructions provoke an exception. Thus, we need to provide support for riscv32imc-unknown-none-elf to use LR/SC instructions via portable-atomic. However, currently you either use emulation of all the atomic instructions or a faulty atomic target.

This PR uses a new version of portable-atomic, which added a new feature to use real AMO instructions for riscv32imc-unknown-none-elf targets while emulating LR/SC instructions. This is particularly well-suited for the E310x microcontroller. Note that the MSRV is now 1.72.

As a side note: In my opinion, this microcontroller does not deserve to be called a riscv32imac target. We should stop supporting riscv32imac and clearly document this particularity, asking users to always use riscv32imc with portable-atomic and force-amo when needed.

Copy link
Collaborator

@almindor almindor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also agree with the imc/imac cleanup it's been a mess

@romancardenas
Copy link
Contributor Author

This PR solves #56

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.

2 participants