Skip to content

Adds support for AArch64 SVE to inline assembly - #158312

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
CrooseGit:dev/reucru01/sve-asm-support
Sep 5, 2026
Merged

Adds support for AArch64 SVE to inline assembly#158312
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
CrooseGit:dev/reucru01/sve-asm-support

Conversation

@CrooseGit

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot

rustbot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_cranelift is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_cranelift instead.

cc @bjorn3

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 23, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 23, 2026
@rustbot

rustbot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

r? @nikomatsakis

rustbot has assigned @nikomatsakis.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 21 candidates

@rust-log-analyzer

This comment has been minimized.

@CrooseGit
CrooseGit force-pushed the dev/reucru01/sve-asm-support branch from 544d13e to 29690b5 Compare June 24, 2026 10:11
@rustbot

This comment has been minimized.

@davidtwco

Copy link
Copy Markdown
Member

r? compiler

@rustbot rustbot assigned tiif and unassigned nikomatsakis Jul 6, 2026
@tiif

tiif commented Jul 9, 2026

Copy link
Copy Markdown
Member

r? compiler

@rustbot rustbot assigned hanna-kruppe and unassigned tiif Jul 9, 2026
@hanna-kruppe

Copy link
Copy Markdown
Contributor

r? compiler

@rustbot rustbot assigned TaKO8Ki and unassigned hanna-kruppe Jul 11, 2026
@davidtwco

Copy link
Copy Markdown
Member

r? @Amanieu

@rust-bors

This comment was marked as resolved.

@davidtwco
davidtwco force-pushed the dev/reucru01/sve-asm-support branch from 29690b5 to 140fb02 Compare August 19, 2026 10:47
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@davidtwco
davidtwco force-pushed the dev/reucru01/sve-asm-support branch from 140fb02 to 5a331e4 Compare August 19, 2026 11:04
@Amanieu

Amanieu commented Aug 23, 2026

Copy link
Copy Markdown
Member

Finally getting around to reviewing this, sorry for the delay.

Why did you choose to make zreg a separate register class from vreg? I feel that the design would be much cleaner if all we did was enable more types to be used with vreg when the sve feature is available.

Other than that detail, the rest of the code mostly looks correct.

@Amanieu

Amanieu commented Aug 25, 2026

Copy link
Copy Markdown
Member

I made 2 changes:

  • zreg is removed, instead Z registers are represented using a z modifier on vreg.
  • ffr is moved out of preg into a separate ffr clobber-only class.

@rust-bors

This comment has been minimized.

CrooseGit and others added 5 commits September 4, 2026 13:29
Also blesses existing tests to make way for sve asm support
Facilitates scalable vector support in inline assembly.
Adds new `zreg` register type and `SveVec*` variants to `InlineAsmType`
@davidtwco
davidtwco force-pushed the dev/reucru01/sve-asm-support branch from 36a84c5 to c91f5cb Compare September 4, 2026 13:30
@rustbot

rustbot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@davidtwco

Copy link
Copy Markdown
Member

Rebased this, not sure how you want to handle the review @Amanieu as we've both made some changes

@Amanieu

Amanieu commented Sep 5, 2026

Copy link
Copy Markdown
Member

Given that we've reviewed each other's changes, let's just...

@bors r+

@rust-bors

rust-bors Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c91f5cb has been approved by Amanieu

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 5, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 5, 2026
…port, r=Amanieu

Adds support for AArch64 SVE to inline assembly
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Sep 5, 2026
…port, r=Amanieu

Adds support for AArch64 SVE to inline assembly
rust-bors Bot pushed a commit that referenced this pull request Sep 5, 2026
Rollup of 14 pull requests

Successful merges:

 - #162324 (miri subtree update)
 - #162170 (bootstrap: use target's LLVM libdir when cross-compiling)
 - #158312 (Adds support for AArch64 SVE to inline assembly)
 - #159792 (A more readable debug map for IndexMaps)
 - #160745 (make closures act like MaybeDangling)
 - #161263 (break rustc_expand-rustc_middle dependency)
 - #161895 (std::sys::pal::sgx: fix mismatched alloc/free alignment)
 - #161940 (Promote `wasm32-wasip3` to a tier 2 target)
 - #161397 (coverage: Tidy tests and add some new ones)
 - #161616 (Report precondition violation for `<usize as SliceIndex>::get_unchecked` in const-eval)
 - #162248 (Add regression test for unsized const parameter default ICE)
 - #162250 (Fix hashing of span end columns in incremental compilation)
 - #162265 (cargotest: add lockfiles)
 - #162318 (bootstrap: Fix broken path for `./x doc compiler/rustc --open`)
@rust-bors
rust-bors Bot merged commit f6f7d61 into rust-lang:main Sep 5, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Sep 5, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 5, 2026
Rollup merge of #158312 - CrooseGit:dev/reucru01/sve-asm-support, r=Amanieu

Adds support for AArch64 SVE to inline assembly
@rust-timer

Copy link
Copy Markdown
Collaborator

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (778219a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.9%, secondary -0.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.9% [5.9%, 5.9%] 1
Improvements ✅
(primary)
-1.9% [-2.7%, -1.2%] 4
Improvements ✅
(secondary)
-2.4% [-2.6%, -2.0%] 3
All ❌✅ (primary) -1.9% [-2.7%, -1.2%] 4

Cycles

This perf run didn't have relevant results for this metric.

Binary size

Results (primary 0.0%, secondary 0.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.1%] 11
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.1%] 11

Bootstrap: missing data
Artifact size: 403.33 MiB -> 403.31 MiB (-0.01%)

pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Sep 6, 2026
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#162324 (miri subtree update)
 - rust-lang/rust#162170 (bootstrap: use target's LLVM libdir when cross-compiling)
 - rust-lang/rust#158312 (Adds support for AArch64 SVE to inline assembly)
 - rust-lang/rust#159792 (A more readable debug map for IndexMaps)
 - rust-lang/rust#160745 (make closures act like MaybeDangling)
 - rust-lang/rust#161263 (break rustc_expand-rustc_middle dependency)
 - rust-lang/rust#161895 (std::sys::pal::sgx: fix mismatched alloc/free alignment)
 - rust-lang/rust#161940 (Promote `wasm32-wasip3` to a tier 2 target)
 - rust-lang/rust#161397 (coverage: Tidy tests and add some new ones)
 - rust-lang/rust#161616 (Report precondition violation for `<usize as SliceIndex>::get_unchecked` in const-eval)
 - rust-lang/rust#162248 (Add regression test for unsized const parameter default ICE)
 - rust-lang/rust#162250 (Fix hashing of span end columns in incremental compilation)
 - rust-lang/rust#162265 (cargotest: add lockfiles)
 - rust-lang/rust#162318 (bootstrap: Fix broken path for `./x doc compiler/rustc --open`)
renovate-bot pushed a commit to renovate-bot/rust-lang-_-compiler-builtins that referenced this pull request Sep 7, 2026
Rollup of 14 pull requests

Successful merges:

 - rust-lang/rust#162324 (miri subtree update)
 - rust-lang/rust#162170 (bootstrap: use target's LLVM libdir when cross-compiling)
 - rust-lang/rust#158312 (Adds support for AArch64 SVE to inline assembly)
 - rust-lang/rust#159792 (A more readable debug map for IndexMaps)
 - rust-lang/rust#160745 (make closures act like MaybeDangling)
 - rust-lang/rust#161263 (break rustc_expand-rustc_middle dependency)
 - rust-lang/rust#161895 (std::sys::pal::sgx: fix mismatched alloc/free alignment)
 - rust-lang/rust#161940 (Promote `wasm32-wasip3` to a tier 2 target)
 - rust-lang/rust#161397 (coverage: Tidy tests and add some new ones)
 - rust-lang/rust#161616 (Report precondition violation for `<usize as SliceIndex>::get_unchecked` in const-eval)
 - rust-lang/rust#162248 (Add regression test for unsized const parameter default ICE)
 - rust-lang/rust#162250 (Fix hashing of span end columns in incremental compilation)
 - rust-lang/rust#162265 (cargotest: add lockfiles)
 - rust-lang/rust#162318 (bootstrap: Fix broken path for `./x doc compiler/rustc --open`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants