Skip to content

Add safety sections to xsetbv and xgetbv - #2252

Open
kiana1kaslana wants to merge 1 commit into
rust-lang:mainfrom
kiana1kaslana:safety-doc-xsetbv-xgetbv
Open

kiana1kaslana wants to merge 1 commit into
rust-lang:mainfrom
kiana1kaslana:safety-doc-xsetbv-xgetbv

Conversation

@kiana1kaslana

@kiana1kaslana kiana1kaslana commented Oct 11, 2026 •

Copy link
Copy Markdown

_xsetbv and _xgetbv are declared unsafe but carry no # Safety section. This adds the missing sections.

Both intrinsics address an extended control register selected by the low 32 bits of their first argument, currently only XCR0. The sections require that register to be supported, and for _xsetbv additionally that the written value be legal for the register.

Doc-only change.

@rustbot

rustbot commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @Amanieu (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn
  • @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn expanded to Amanieu, adamgemmell, davidtwco, folkertdev, sayantn
  • Random selection from Amanieu, adamgemmell, davidtwco, folkertdev, sayantn

@kiana1kaslana
kiana1kaslana force-pushed the safety-doc-xsetbv-xgetbv branch 2 times, most recently from 50413fb to 24065c5 Compare October 13, 2026 01:54
@kiana1kaslana
kiana1kaslana force-pushed the safety-doc-xsetbv-xgetbv branch from 24065c5 to 05e3a23 Compare October 13, 2026 02:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants