Skip to content

Commit d8b0b51

Browse files
eduardosmAmanieu
authored andcommitted
Deprecate functions that use _mm_getcsr or _mm_setcsr
1 parent 5bad92a commit d8b0b51

File tree

1 file changed

+32
-0
lines changed
  • crates/core_arch/src/x86

1 file changed

+32
-0
lines changed

crates/core_arch/src/x86/sse.rs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,10 @@ pub const _MM_FLUSH_ZERO_OFF: u32 = 0x0000;
16181618
#[allow(non_snake_case)]
16191619
#[target_feature(enable = "sse")]
16201620
#[stable(feature = "simd_x86", since = "1.27.0")]
1621+
#[deprecated(
1622+
since = "1.73.0",
1623+
note = "see `_mm_getcsr` documentation - use inline assembly instead"
1624+
)]
16211625
pub unsafe fn _MM_GET_EXCEPTION_MASK() -> u32 {
16221626
_mm_getcsr() & _MM_MASK_MASK
16231627
}
@@ -1629,6 +1633,10 @@ pub unsafe fn _MM_GET_EXCEPTION_MASK() -> u32 {
16291633
#[allow(non_snake_case)]
16301634
#[target_feature(enable = "sse")]
16311635
#[stable(feature = "simd_x86", since = "1.27.0")]
1636+
#[deprecated(
1637+
since = "1.73.0",
1638+
note = "see `_mm_getcsr` documentation - use inline assembly instead"
1639+
)]
16321640
pub unsafe fn _MM_GET_EXCEPTION_STATE() -> u32 {
16331641
_mm_getcsr() & _MM_EXCEPT_MASK
16341642
}
@@ -1640,6 +1648,10 @@ pub unsafe fn _MM_GET_EXCEPTION_STATE() -> u32 {
16401648
#[allow(non_snake_case)]
16411649
#[target_feature(enable = "sse")]
16421650
#[stable(feature = "simd_x86", since = "1.27.0")]
1651+
#[deprecated(
1652+
since = "1.73.0",
1653+
note = "see `_mm_getcsr` documentation - use inline assembly instead"
1654+
)]
16431655
pub unsafe fn _MM_GET_FLUSH_ZERO_MODE() -> u32 {
16441656
_mm_getcsr() & _MM_FLUSH_ZERO_MASK
16451657
}
@@ -1651,6 +1663,10 @@ pub unsafe fn _MM_GET_FLUSH_ZERO_MODE() -> u32 {
16511663
#[allow(non_snake_case)]
16521664
#[target_feature(enable = "sse")]
16531665
#[stable(feature = "simd_x86", since = "1.27.0")]
1666+
#[deprecated(
1667+
since = "1.73.0",
1668+
note = "see `_mm_getcsr` documentation - use inline assembly instead"
1669+
)]
16541670
pub unsafe fn _MM_GET_ROUNDING_MODE() -> u32 {
16551671
_mm_getcsr() & _MM_ROUND_MASK
16561672
}
@@ -1662,6 +1678,10 @@ pub unsafe fn _MM_GET_ROUNDING_MODE() -> u32 {
16621678
#[allow(non_snake_case)]
16631679
#[target_feature(enable = "sse")]
16641680
#[stable(feature = "simd_x86", since = "1.27.0")]
1681+
#[deprecated(
1682+
since = "1.73.0",
1683+
note = "see `_mm_setcsr` documentation - use inline assembly instead"
1684+
)]
16651685
pub unsafe fn _MM_SET_EXCEPTION_MASK(x: u32) {
16661686
_mm_setcsr((_mm_getcsr() & !_MM_MASK_MASK) | x)
16671687
}
@@ -1673,6 +1693,10 @@ pub unsafe fn _MM_SET_EXCEPTION_MASK(x: u32) {
16731693
#[allow(non_snake_case)]
16741694
#[target_feature(enable = "sse")]
16751695
#[stable(feature = "simd_x86", since = "1.27.0")]
1696+
#[deprecated(
1697+
since = "1.73.0",
1698+
note = "see `_mm_setcsr` documentation - use inline assembly instead"
1699+
)]
16761700
pub unsafe fn _MM_SET_EXCEPTION_STATE(x: u32) {
16771701
_mm_setcsr((_mm_getcsr() & !_MM_EXCEPT_MASK) | x)
16781702
}
@@ -1684,6 +1708,10 @@ pub unsafe fn _MM_SET_EXCEPTION_STATE(x: u32) {
16841708
#[allow(non_snake_case)]
16851709
#[target_feature(enable = "sse")]
16861710
#[stable(feature = "simd_x86", since = "1.27.0")]
1711+
#[deprecated(
1712+
since = "1.73.0",
1713+
note = "see `_mm_setcsr` documentation - use inline assembly instead"
1714+
)]
16871715
pub unsafe fn _MM_SET_FLUSH_ZERO_MODE(x: u32) {
16881716
let val = (_mm_getcsr() & !_MM_FLUSH_ZERO_MASK) | x;
16891717
// println!("setting csr={:x}", val);
@@ -1697,6 +1725,10 @@ pub unsafe fn _MM_SET_FLUSH_ZERO_MODE(x: u32) {
16971725
#[allow(non_snake_case)]
16981726
#[target_feature(enable = "sse")]
16991727
#[stable(feature = "simd_x86", since = "1.27.0")]
1728+
#[deprecated(
1729+
since = "1.73.0",
1730+
note = "see `_mm_setcsr` documentation - use inline assembly instead"
1731+
)]
17001732
pub unsafe fn _MM_SET_ROUNDING_MODE(x: u32) {
17011733
_mm_setcsr((_mm_getcsr() & !_MM_ROUND_MASK) | x)
17021734
}

0 commit comments

Comments
 (0)