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

Cranelift: Incorrect abi for i128, i128 return value on x86_64 sysv #9250

Open
bjorn3 opened this issue Sep 15, 2024 · 2 comments
Open

Cranelift: Incorrect abi for i128, i128 return value on x86_64 sysv #9250

bjorn3 opened this issue Sep 15, 2024 · 2 comments
Labels
bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator

Comments

@bjorn3
Copy link
Contributor

bjorn3 commented Sep 15, 2024

Expected Results

All return values are returned using a single return pointer.

Actual Results

Return values are put into registers where possible and on the stack for the rest.

Versions and Environment

Cranelift version or commit: 0.111

Operating system: Linux

Architecture: x86_64

Extra Info

This is one of the causes for rust-lang/rustc_codegen_cranelift#1525. The same issue may exist on aarch64 and other archs too, but haven't checked yet.

@bjorn3 bjorn3 added bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator labels Sep 15, 2024
@bjorn3
Copy link
Contributor Author

bjorn3 commented Sep 16, 2024

Found another issue: The x86_64 and riscv64 backends add an implicit return pointer after all other arguments rather than as first argument.

Edit: Fixed in #9267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior in the current implementation that needs fixing cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

No branches or pull requests

1 participant