Skip to content

Stabilize passing 128-bit integers via vector registers with asm! on x86 - #2313

Merged
ehuss merged 2 commits into
rust-lang:masterfrom
folkertdev:assembly-x86-i128
Aug 4, 2026
Merged

Stabilize passing 128-bit integers via vector registers with asm! on x86#2313
ehuss merged 2 commits into
rust-lang:masterfrom
folkertdev:assembly-x86-i128

Conversation

@folkertdev

@folkertdevfolkertdev commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

I believe that this is the only change that is needed.

Stabilization PR: rust-lang/rust#159525
Tracking Issue: rust-lang/rust#133416

@ehussehuss added the S-waiting-on-stabilization Waiting for a stabilization PR to be merged in the main Rust repository label Jul 28, 2026
Comment threadsrc/inline-assembly.md Outdated

@traviscrosstraviscross left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved modulo fixing the missing backticks.

View changes since this review

Co-authored-by: Eric Huss <eric@huss.org>
@folkertdev
folkertdev marked this pull request as ready for review July 28, 2026 18:08
@rustbotrustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Jul 28, 2026
@traviscrosstraviscross removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Jul 29, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 1, 2026
… r=Amanieu
Stabilize passing 128-bit integers via vector registers with `asm!` on x86
tracking issue: rust-lang#133416
reference PR: rust-lang/reference#2313
# Stabilization report
## Summary
Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:
```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;
asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);
asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);
asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```
32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.
This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it.
## History
- rust-lang#151059
## Open questions
None.
r? Amanieu
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 1, 2026
… r=Amanieu
Stabilize passing 128-bit integers via vector registers with `asm!` on x86
tracking issue: rust-lang#133416
reference PR: rust-lang/reference#2313
# Stabilization report
## Summary
Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:
```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;
asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);
asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);
asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```
32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.
This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it.
## History
- rust-lang#151059
## Open questions
None.
r? Amanieu
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 2, 2026
… r=Amanieu
Stabilize passing 128-bit integers via vector registers with `asm!` on x86
tracking issue: rust-lang#133416
reference PR: rust-lang/reference#2313
# Stabilization report
## Summary
Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:
```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;
asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);
asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);
asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```
32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.
This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it.
## History
- rust-lang#151059
## Open questions
None.
r? Amanieu
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 2, 2026
… r=Amanieu
Stabilize passing 128-bit integers via vector registers with `asm!` on x86
tracking issue: rust-lang#133416
reference PR: rust-lang/reference#2313
# Stabilization report
## Summary
Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:
```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;
asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);
asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);
asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```
32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.
This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it.
## History
- rust-lang#151059
## Open questions
None.
r? Amanieu
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 2, 2026
… r=Amanieu
Stabilize passing 128-bit integers via vector registers with `asm!` on x86
tracking issue: rust-lang#133416
reference PR: rust-lang/reference#2313
# Stabilization report
## Summary
Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:
```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;
asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);
asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);
asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```
32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.
This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it.
## History
- rust-lang#151059
## Open questions
None.
r? Amanieu
rust-timer added a commit to rust-lang/rust that referenced this pull request Aug 2, 2026
Rollup merge of #159525 - folkertdev:stabilize-x86-i128-asm, r=Amanieu
Stabilize passing 128-bit integers via vector registers with `asm!` on x86
tracking issue: #133416
reference PR: rust-lang/reference#2313
# Stabilization report
## Summary
Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:
```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;
asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);
asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);
asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```
32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.
This feature is part of [`asm_experimental_reg`](#133416). We're not stabilizing that feature as a whole, but only pull out part of it.
## History
- #151059
## Open questions
None.
r? Amanieu
@ehuss
ehuss added this pull request to the merge queueAug 4, 2026
Merged via the queue into rust-lang:master with commit 62056adAug 4, 2026
6 checks passed
WhySoBad pushed a commit to WhySoBad/miri that referenced this pull request Aug 5, 2026
Stabilize passing 128-bit integers via vector registers with `asm!` on x86
tracking issue: rust-lang/rust#133416
reference PR: rust-lang/reference#2313
# Stabilization report
## Summary
Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:
```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;
asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);
asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);
asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```
32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.
This feature is part of [`asm_experimental_reg`](rust-lang/rust#133416). We're not stabilizing that feature as a whole, but only pull out part of it.
## History
- rust-lang/rust#151059
## Open questions
None.
r? Amanieu
@rustbotrustbot mentioned this pull request Aug 10, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 11, 2026
Update books
## rust-lang/reference
9 commits in afdc77bab886d4455c11247cdd32391bfab636ae..82da570bafd9efed421bdbae0f8603ede8dd308b
2026-08-08 22:04:17 UTC to 2026-07-28 18:20:15 UTC
- add c-variadic function definitions (rust-lang/reference#2177)
- Update `no_mangle` to use the attribute template (rust-lang/reference#1904)
- enums with fields: clarify that repr(C, int) is quite different from repr(int) (rust-lang/reference#2227)
- aliasing rules also apply inside private fields (rust-lang/reference#2304)
- attributes: do not explain syntax in rules (rust-lang/reference#2306)
- Document prohibition on inner attribute macros (rust-lang/reference#2311)
- Use authentication for linkcheck (rust-lang/reference#2319)
- Stabilize passing 128-bit integers via vector registers with `asm!` on x86 (rust-lang/reference#2313)
- Add a rule for attribute macro outline modules (rust-lang/reference#2310)
@rustbotrustbot added this to the 1.99.0 milestone Aug 11, 2026
rust-timer added a commit to rust-lang/rust that referenced this pull request Aug 11, 2026
Rollup merge of #160866 - rustbot:docs-update, r=traviscross
Update books
## rust-lang/reference
9 commits in afdc77bab886d4455c11247cdd32391bfab636ae..82da570bafd9efed421bdbae0f8603ede8dd308b
2026-08-08 22:04:17 UTC to 2026-07-28 18:20:15 UTC
- add c-variadic function definitions (rust-lang/reference#2177)
- Update `no_mangle` to use the attribute template (rust-lang/reference#1904)
- enums with fields: clarify that repr(C, int) is quite different from repr(int) (rust-lang/reference#2227)
- aliasing rules also apply inside private fields (rust-lang/reference#2304)
- attributes: do not explain syntax in rules (rust-lang/reference#2306)
- Document prohibition on inner attribute macros (rust-lang/reference#2311)
- Use authentication for linkcheck (rust-lang/reference#2319)
- Stabilize passing 128-bit integers via vector registers with `asm!` on x86 (rust-lang/reference#2313)
- Add a rule for attribute macro outline modules (rust-lang/reference#2310)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-stabilizationWaiting for a stabilization PR to be merged in the main Rust repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@folkertdev@ehuss@traviscross@rustbot