Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions crates/core_arch/src/x86/xsave.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ pub unsafe fn _xsave(mem_addr: *mut u8, save_mask: u64) {
/// boundary.
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_xrstor)
///
/// # Safety
///
/// - `mem_addr` must be valid for reads of the whole `XSAVE` area it
/// describes.
/// - `mem_addr` must be 64-byte aligned.
///
/// The `XSAVE` area is the state image format that the `xsave` family
/// writes and `xrstor` reads; the memory must hold one produced by a
/// prior save.
#[inline]
#[target_feature(enable = "xsave")]
#[cfg_attr(test, assert_instr(xrstor))]
Expand Down Expand Up @@ -151,6 +161,16 @@ pub unsafe fn _xsaves(mem_addr: *mut u8, save_mask: u64) {
/// boundary.
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_xrstors)
///
/// # Safety
///
/// - `mem_addr` must be valid for reads of the whole `XSAVE` area it
/// describes.
/// - `mem_addr` must be 64-byte aligned.
///
/// The `XSAVE` area is the state image format that the `xsave` family
/// writes and `xrstor` reads; the memory must hold one produced by a
/// prior save.
#[inline]
#[target_feature(enable = "xsave,xsaves")]
#[cfg_attr(test, assert_instr(xrstors))]
Expand Down
20 changes: 20 additions & 0 deletions crates/core_arch/src/x86_64/xsave.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ pub unsafe fn _xsave64(mem_addr: *mut u8, save_mask: u64) {
/// boundary.
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_xrstor64)
///
/// # Safety
///
/// - `mem_addr` must be valid for reads of the whole `XSAVE` area it
/// describes.
/// - `mem_addr` must be 64-byte aligned.
///
/// The `XSAVE` area is the state image format that the `xsave` family
/// writes and `xrstor` reads; the memory must hold one produced by a
/// prior save.
#[inline]
#[target_feature(enable = "xsave")]
#[cfg_attr(test, assert_instr(xrstor64))]
Expand Down Expand Up @@ -116,6 +126,16 @@ pub unsafe fn _xsaves64(mem_addr: *mut u8, save_mask: u64) {
/// boundary.
///
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_xrstors64)
///
/// # Safety
///
/// - `mem_addr` must be valid for reads of the whole `XSAVE` area it
/// describes.
/// - `mem_addr` must be 64-byte aligned.
///
/// The `XSAVE` area is the state image format that the `xsave` family
/// writes and `xrstor` reads; the memory must hold one produced by a
/// prior save.
#[inline]
#[target_feature(enable = "xsave,xsaves")]
#[cfg_attr(test, assert_instr(xrstors64))]
Expand Down
Loading