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

user_fpsimd_struct on aarch64 #2524

Closed
irgstg opened this issue Nov 9, 2021 · 1 comment · Fixed by #2719
Closed

user_fpsimd_struct on aarch64 #2524

irgstg opened this issue Nov 9, 2021 · 1 comment · Fixed by #2719

Comments

@irgstg
Copy link
Contributor

irgstg commented Nov 9, 2021

On aarch64, user_fpsimd_struct includes a __uint128_t type:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/aarch64/sys/user.h;h=9927b3ac3c43096d85f65421c89c8bef5e0bbce9;hb=a85c93c42433aa52d4c5bc18e1dff038a82415bf#l32

There is a known issue regarding __uint128_t / __int128_t alignment to be different from u128 / i128 in rust.
I know that some of you guys faced this issue in some occasions (e.g. #2008).
In #2417 he tried few different ways to commit this struct, which fails tests.

Should we consider any other workaround, if there is any to consider?

@Gankra
Copy link
Contributor

Gankra commented Mar 9, 2022

PSA: rustc actually correctly aligns u128/i128 on aarch64 linux (android) and macos and it's totally sound to use it for FFI on those platforms! So we can actually properly add these types and unblock everything that wants to use them.

rust-lang/rust#54341 (comment)

Gankra added a commit to Gankra/libc that referenced this issue Mar 9, 2022
Potentially fixes rust-lang#2524, see the comments in the patch for details.
Gankra added a commit to Gankra/libc that referenced this issue Mar 9, 2022
Potentially fixes rust-lang#2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 17, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 18, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
bors added a commit that referenced this issue Mar 23, 2022
Create optionally-available __int128 typedefs and use them for ARM64 definitions.

Potentially fixes #2524, see the comments in the patch for details.
@bors bors closed this as completed in f00ea00 Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants