bjorn3 added the bug label to Issue #9250.
bjorn3 added the cranelift label to Issue #9250.
bjorn3 opened issue #9250:
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 https://github.com/rust-lang/rustc_codegen_cranelift/issues/1525. The same issue may exist on aarch64 and other archs too, but haven't checked yet.
bjorn3 commented on issue #9250:
PR's opened while working on this:
bjorn3 commented on issue #9250:
Found another issue: The x86_64 and riscv64 backends add an implicit return pointer after all other arguments rather than as first argument.
bjorn3 edited a comment on issue #9250:
PR's opened while working on this:
bjorn3 edited a comment on issue #9250:
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 https://github.com/bytecodealliance/wasmtime/pull/9267
bjorn3 edited a comment on issue #9250:
PR's opened while working on this:
bjorn3 edited a comment on issue #9250:
PR's opened while working on this:
bjorn3 commented on issue #9250:
Expected Results
All return values are returned using a single return pointer.
Actually, LLVM passes the return value on the stack if it doesn't fit in registers. It doesn't use a return area pointer.
bjorn3 edited a comment on issue #9250:
Expected Results
All return values are returned using a single return pointer.
Actually, LLVM passes the return value on the stack if it doesn't fit in registers. It doesn't use a return area pointer.
Edit: Never mind. I was wrong about this.
bjorn3 commented on issue #9250:
As of https://github.com/rust-lang/rust/pull/131211 rustc should no longer emit this return type. If this is indeed the case, I propose to deny any return type that doesn't fit in the abi designated return value registers for at least the system_v and windows_fastcall call convs. And ideally also for every other call conv to be able to get rid of the implicit sret argument introduction in the abi calculation code which complicates this code by a fair bit.
Last updated: Nov 22 2024 at 17:03 UTC