Skip to content

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

Open
folkertdev wants to merge 2 commits into
rust-lang:mainfrom
folkertdev:stabilize-x86-i128-asm
Open

Stabilize passing 128-bit integers via vector registers with asm! on x86#159525
folkertdev wants to merge 2 commits into
rust-lang:mainfrom
folkertdev:stabilize-x86-i128-asm

Conversation

@folkertdev

Copy link
Copy Markdown
Contributor

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:

// 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. We're not stabilizing that feature as a whole, but only pull out part of it.

History

Open questions

None.

r? Amanieu

@folkertdev folkertdev added A-inline-assembly Area: Inline assembly (`asm!(…)`) I-lang-nominated Nominated for discussion during a lang team meeting. labels Jul 18, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-inline-assembly Area: Inline assembly (`asm!(…)`) I-lang-nominated Nominated for discussion during a lang team meeting. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

3 participants