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
@traviscross traviscross added P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang T-lang Relevant to the language team labels Jul 22, 2026
@traviscross

Copy link
Copy Markdown
Contributor

Thanks @folkertdev.

@rfcbot fcp merge lang

@rust-rfcbot

rust-rfcbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

@traviscross has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rust-rfcbot rust-rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Jul 22, 2026
@traviscross traviscross added the I-lang-radar Items that are on lang's radar and will need eventual work or consideration. label Jul 22, 2026
@tmandry

tmandry commented Jul 22, 2026

Copy link
Copy Markdown
Member

@rfcbot reviewed

1 similar comment
@nikomatsakis

Copy link
Copy Markdown
Contributor

@rfcbot reviewed

@rust-rfcbot rust-rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Jul 22, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@traviscross traviscross removed I-lang-nominated Nominated for discussion during a lang team meeting. P-lang-drag-1 Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang labels Jul 22, 2026

@Amanieu Amanieu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r=me once FCP completes

View changes since this review

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!(…)`) disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. I-lang-radar Items that are on lang's radar and will need eventual work or consideration. 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. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants