-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
[ARM] Incorrect calling convention when invoking __sync builtins #61880
Labels
Comments
@llvm/issue-subscribers-backend-arm |
@llvm/issue-subscribers-backend-arm |
@Amanieu Is this still an issue? |
Yes: https://godbolt.org/z/r7fbP7W8h The correct code should have a sign extension of |
cc @TNorthover @asl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IR
Asm
The problem
The ARM calling convention specified that integers smaller than the word size need to be sign/zero-extended to the word size.
__sync_fetch_and_max_1
expects a signedi8
for its second argument, which should be in sign-extended form. However LLVM isn't performing a sign-extension for this parameter, which leads to issues such as rust-lang/rust#100650.The text was updated successfully, but these errors were encountered: