Add support for SVE types and registers in inline assembly#1
Open
GeorgeWort wants to merge 3 commits intoJamieCunliffe:svefrom
Open
Add support for SVE types and registers in inline assembly#1GeorgeWort wants to merge 3 commits intoJamieCunliffe:svefrom
GeorgeWort wants to merge 3 commits intoJamieCunliffe:svefrom
Conversation
The representation of the element type has been changed to be a slice rather than a zero length array. Two feature gates are now required in core_arch unsized fn params and unsized locals. This still leaves unsized return types being an issue. For this we are currently bypassing some of the `Sized` trait checking to pass when the type is scalable simd. This still leaves the copy issue. For that we have marked scalable simd types as trivally pure clone copy. We have still had to remove some trait checks for the copy trait with this though as they are still performed in certain situations. The implementation of `transmute` is also an issue for us. For this a new SIMD intrinsic has been created simd_reinterpret which performs a transmute on SIMD vectors. A few intrinsics need to be able to produce an LLVM `undef` this intrinsic will also produce that when given a zero sized input.
This patch passes three new register constraints (y, Upa, Upl) to LLVM, along with allowing the SVE types to be passed in and out of inline assembly.
JamieCunliffe
pushed a commit
that referenced
this pull request
Jul 9, 2025
JamieCunliffe
pushed a commit
that referenced
this pull request
Jan 8, 2026
This resulted in the following error for me:
error[E0464]: multiple candidates for `rlib` dependency `rustc_literal_escaper` found
--> clippy_dev/src/lib.rs:25:1
|
25 | extern crate rustc_literal_escaper;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: candidate #1: /home/pkrones/.rustup/toolchains/nightly-2025-12-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_literal_escaper-4f30574e01c3dad1.rlib
= note: candidate rust-lang#2: /home/pkrones/.rustup/toolchains/nightly-2025-12-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_literal_escaper-c8a0e29ad1040cee.rmeta
Other tools in the Rust repo also take that as an explicit dependency, like rust-analyzer or lint-docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch passes three new register constraints (y, Upa, Upl) to LLVM, along with allowing the SVE types to be passed in and out of inline assembly.