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

[GCAtomic] Treat single capability structs like a capability #724

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

arichardson
Copy link
Member

This allows emitting inline atomics instead of needing a libcall and
avoids casting such structs to i128.

See https://git.morello-project.org/morello/llvm-project/-/issues/75

See https://git.morello-project.org/morello/llvm-project/-/issues/75
for Morello, where this is miscompiled to i128 exchanges instead of
using libcalls/capabilities.
This shows the undesirable casts to i128. They happen to be benign for
the current codegen, but we should be using a capability type for the
struct that contains only one capability.
This is duplicated twice in RISCVABIInfo and I intend to reuse this in
the following commit.
This allows emitting inline atomics instead of needing a libcall and
avoids casting such structs to i128.

See https://git.morello-project.org/morello/llvm-project/-/issues/75
@arichardson
Copy link
Member Author

@jrtc27 ping. Does this look sensible?

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.

1 participant