-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Tracking issue: -Zreg-struct-return
support in rustc
#116973
Comments
For the rust ABI we already do this. For C ABI compat we will need this. I'm not sure it should be a cli argument though as it affects the ABI and thus has to match for all crates. ABI changes are normally specified in the target spec. |
Looks like there is already a target spec key for this used by eg FreeBSD: |
Yeah, it is the target spec vs. CLI discussion. If I recall correctly, at some point the topic was brought up we were told |
@rustbot label A-rust-for-linux |
-Zreg-struct-return
support in rustc
-Zreg-struct-return
support in rustc
It is not fully correct atm. For structs with 3 fields and more - yes, it works. But 2-field structs are represented by |
… r=workingjubilee rust_for_linux: -Zreg-struct-return commandline flag for X86 (rust-lang#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: rust-lang#116973
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#130777 (rust_for_linux: -Zreg-struct-return commandline flag for X86 (rust-lang#116973)) - rust-lang#133211 (Extend Miri to correctly pass mutable pointers through FFI) - rust-lang#133294 (crashes: more tests) - rust-lang#133790 (Improve documentation for Vec::extend_from_within) - rust-lang#133930 (rustbook: update to use new mdbook-trpl package from The Book) r? `@ghost` `@rustbot` modify labels: rollup
… r=workingjubilee rust_for_linux: -Zreg-struct-return commandline flag for X86 (rust-lang#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: rust-lang#116973
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#130777 (rust_for_linux: -Zreg-struct-return commandline flag for X86 (rust-lang#116973)) - rust-lang#133211 (Extend Miri to correctly pass mutable pointers through FFI) - rust-lang#133790 (Improve documentation for Vec::extend_from_within) - rust-lang#133930 (rustbook: update to use new mdbook-trpl package from The Book) - rust-lang#133931 (Only allow PassMode::Direct for aggregates on wasm when using the C ABI) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#130777 - azhogin:azhogin/reg-struct-return, r=workingjubilee rust_for_linux: -Zreg-struct-return commandline flag for X86 (rust-lang#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: rust-lang#116973
…gjubilee rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: rust-lang/rust#116973
…gjubilee rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973) Command line flag `-Zreg-struct-return` for X86 (32-bit) for rust-for-linux. This flag enables the same behavior as the `abi_return_struct_as_int` target spec key. - Tracking issue: rust-lang/rust#116973
i.e. the equivalent of Clang's/GCC's
-freg-struct-return
. The kernel needs it to support the x86 32-bit architecture, together with-Zregparm=3
.It could potentially be a "global target feature", i.e. a target feature that is required to be set the same way for all compilation units.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
Unresolved Questions & Answers
-Zreg-struct-return
support inrustc
#116973 (comment)"C"
,"cdecl"
, and"stdcall"
?The text was updated successfully, but these errors were encountered: