Skip to content

rustc: Fix x86 ffi for struct arguments #12762

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Mar 19, 2014
Merged

Conversation

klutzy
Copy link
Contributor

@klutzy klutzy commented Mar 8, 2014

This fixes struct passing abi on x86 ffi: Structs are now passed
indirectly with byval attribute (as clang does).
Empty structs are also explicitly ignored rather than directly passed.

Fixes #5744
Fixes #11198
Fixes #11343

@alexcrichton
Copy link
Member

It looks like the only tests for this PR are the ones that are un-commented for #5744. Are there tests as well for #11198 and #11343? (just want to make sure)

@alexcrichton
Copy link
Member

If this is two distinct bug fixes (by-val and empty structs), it would be nice to have two separate commits for each.

@klutzy
Copy link
Contributor Author

klutzy commented Mar 9, 2014

Separated two fixes. Also added run-pass/extern-pass-empty which checks struct-inside-struct (#11343) and empty structs.
I think run-pass/extern-pass-TwoU8s covers #11198 (though minimal case is four u8s).

klutzy added 2 commits March 19, 2014 16:41
This fixes struct passing abi on x86 ffi: Structs are now passed
indirectly with byval attribute (as clang does).
@klutzy
Copy link
Contributor Author

klutzy commented Mar 19, 2014

Removed unrelated change (discussion here) and it passed make check-fast on win32.
(Note that #12707's modified test case will cause llvm assertion error on x86 as well)

bors added a commit that referenced this pull request Mar 19, 2014
This fixes struct passing abi on x86 ffi: Structs are now passed
indirectly with byval attribute (as clang does).
Empty structs are also explicitly ignored rather than directly passed.

Fixes #5744
Fixes #11198
Fixes #11343
@bors bors closed this Mar 19, 2014
@bors bors merged commit 2d31bca into rust-lang:master Mar 19, 2014
@klutzy klutzy deleted the win-struct-abi branch May 15, 2014 01:15
flip1995 added a commit to flip1995/rust that referenced this pull request Dec 15, 2024
This updates the documentation after rust-lang#13694. It is not based on that PR
chain and can be merged independently, but should be merged after that
PR.

This is partly pulled from rust-lang#12762, but removing the Josh parts.

This includes instructions on how to publish `clippy_utils`.

Closes rust-lang/rust-clippy#13556 (yes, this
is the final PR 🙂)

r? @blyxyas

changelog: `clippy_utils` is now published to crates.io
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants