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

Add test for rust-lang/rust#122767 #23

Closed
cuviper opened this issue Mar 20, 2024 · 2 comments · Fixed by #40
Closed

Add test for rust-lang/rust#122767 #23

cuviper opened this issue Mar 20, 2024 · 2 comments · Fixed by #40
Labels
test-request Add a test to the suite for this

Comments

@cuviper
Copy link

cuviper commented Mar 20, 2024

In rust-lang/rust#122767, ppc64le was found to have a mismatched ABI on this struct:

#[repr(C)]
#[repr(align(16))]
pub struct TwoU64s {
    pub a: u64,
    pub b: u64,
}

Rust was passing this like [2 x i64], while Clang passes [1 x i128] -- notably, it's not bare i128 either.

@Gankra
Copy link
Owner

Gankra commented Jun 30, 2024

I believe this would be TwoU64s.procgen.kdl:

@align 16
struct "TwoU64s" {
    a "u64"
    b "u64"
}

Although see #15 (comment) for caveats on align not being fully implemented/tested yet.

@Gankra
Copy link
Owner

Gankra commented Jun 30, 2024

Filed #26 for the main blocker

@Gankra Gankra added the test-request Add a test to the suite for this label Jun 30, 2024
Gankra added a commit that referenced this issue Jul 1, 2024
Note that C still doesn't implement align, but as of #39 we combinatoric repr(rust) vs repr(c) and include rustcall as a calling convention, so our coverage of rust <-> rust (in particular for codegen_backend users) is significantly improved.

fixes #23
fixes #21
fixes #15
@Gankra Gankra closed this as completed in #40 Jul 1, 2024
@Gankra Gankra closed this as completed in dd37470 Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test-request Add a test to the suite for this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants