-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
extern "C" fn
on mips64 targets does not respect repr(transparent)
#115404
Comments
As per #115238, all affected targets are tier 3 targets. |
WG-prioritization assigning priority (Zulip discussion). @rustbot label -I-prioritize +P-low |
Here's another example of a struct T(f64, f64, f64);
struct Wrap<T>(T);
#[rustc_abi(assert_eq)]
type Test = (extern "C" fn(T), extern "C" fn(Wrap<T>));
(I don't know what the C ABI says for this target, i.e. whether it is truly only double fields that appear directly in the struct type that should be passed in registers, and any doubles in nested fields-of-fields really should be ignored. So there might also be an ABI incompatibility with C here.) |
add rustc_abi(assert_eq) to test some guaranteed or at least highly expected ABI compatibility guarantees This new repr(transparent) test is super useful, it would have found rust-lang#115336 and found rust-lang#115404, rust-lang#115481, rust-lang#115509.
add rustc_abi(assert_eq) to test some guaranteed or at least highly expected ABI compatibility guarantees This new repr(transparent) test is super useful, it would have found rust-lang#115336 and found rust-lang#115404, rust-lang#115481, rust-lang#115509.
add rustc_abi(assert_eq) to test some guaranteed or at least highly expected ABI compatibility guarantees This new repr(transparent) test is super useful, it would have found rust-lang#115336 and found rust-lang#115404, rust-lang#115481, rust-lang#115509.
I'm also seeing this target use |
Yeah, unsized args should always be passed as PassMode::Indirect with on_stack=false. |
add rustc_abi(assert_eq) to test some guaranteed or at least highly expected ABI compatibility guarantees This new repr(transparent) test is super useful, it would have found rust-lang/rust#115336 and found rust-lang/rust#115404, rust-lang/rust#115481, rust-lang/rust#115509.
This is the MIPS version of #115336: on the target
mips64-unknown-linux-gnuabi64
, all arrays and some tuple types like(i32, f32, i64, f64)
have a different ABI when being wrapped inrepr(transparent)
wrappers, and hence this fails the test I added in #115372.For instance for
[u8; 2]
, thePassMode
becomesBut for
Wrapper<[u8; 2]>
it becomesThis also affects mips64el-unknown-linux-gnuabi64, mips64-openwrt-linux-musl, mips64-unknown-linux-muslabi64, mips64el-unknown-linux-muslabi64
Cc @Itus-Shield (listed as maintainer for the openwrt target)
The text was updated successfully, but these errors were encountered: