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

Fix - AArch64 Big Endian Intrinsics #1708

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

Jamesbarford
Copy link
Contributor

AArch64 Big Endian Intrinsics

Automatic generation of AArch64 big endian intrinsics with the new generator. The generated intrinsics are conceptually similar to those in arm_neon.h, utilizing simd_shuffle!(...) to reorder bits as required.

Testing was performed using the intrinsic-test program, confirming that the generated big-endian intrinsics produce the same results as their clang counterparts.

This PR includes updates to run.sh and a new Dockerfile. However, I have not integrated these changes into the CI pipeline because building rustc currently requires modifications to memchr - see here.

With the changes in this PR, it should be possible to build memchr again, thereby enabling aarch64_be-unknown-linux-gnu as a Rust target without requiring pre-modifications to memchr during the rustc build process.

Closes: #1484

@rustbot
Copy link
Collaborator

rustbot commented Feb 6, 2025

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Copy link
Member

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, however there still seems to be some CI failures.

@Jamesbarford Jamesbarford force-pushed the dev/jambar02/big-endian-arm branch from 027b28b to a6958f0 Compare February 19, 2025 08:46
@Jamesbarford
Copy link
Contributor Author

The pipeline should now be fixed, though it currently fails due to:
unknown import: 'env::llvm.wasm.sub.sat.signed.v16i8' has not been defined.. This appears to be unrelated to this work.

The PR is also significantly smaller, as we've isolated the intrinsics that require simd_shuffle!(...) calls. In the previous commit, many simd_shuffle! calls followed the pattern: simd_shuffle!(a, a, [0, 1, 2, 3, 4, 5, 6, 7, ...]), which, upon inspection, appeared to be no-ops. These have now been removed.

Additionally, I've cleaned up the currently non-functional CI code in run.sh and the aarch64_be-unknown-linux-gnu.

@Jamesbarford
Copy link
Contributor Author

Looks like the pipeline is fixed by; #1719

I'm not sure how to re-run this pipeline?

@Jamesbarford Jamesbarford force-pushed the dev/jambar02/big-endian-arm branch from a6958f0 to e4f37d6 Compare February 20, 2025 08:04
@Jamesbarford Jamesbarford force-pushed the dev/jambar02/big-endian-arm branch from e4f37d6 to fbe5fce Compare February 20, 2025 09:44
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 this pull request may close these issues.

NEON intrinsics are broken on big-endian
3 participants