Skip to content

Commit e510b42

Browse files
committed
Add some #[allow(deprecated)]
1 parent 625cd4e commit e510b42

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

crates/core_arch/src/x86/sse.rs

+12
Original file line numberDiff line numberDiff line change
@@ -1613,6 +1613,7 @@ pub const _MM_FLUSH_ZERO_OFF: u32 = 0x0000;
16131613
///
16141614
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_GET_EXCEPTION_MASK)
16151615
#[inline]
1616+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
16161617
#[allow(non_snake_case)]
16171618
#[target_feature(enable = "sse")]
16181619
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -1628,6 +1629,7 @@ pub unsafe fn _MM_GET_EXCEPTION_MASK() -> u32 {
16281629
///
16291630
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_GET_EXCEPTION_STATE)
16301631
#[inline]
1632+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
16311633
#[allow(non_snake_case)]
16321634
#[target_feature(enable = "sse")]
16331635
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -1643,6 +1645,7 @@ pub unsafe fn _MM_GET_EXCEPTION_STATE() -> u32 {
16431645
///
16441646
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_GET_FLUSH_ZERO_MODE)
16451647
#[inline]
1648+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
16461649
#[allow(non_snake_case)]
16471650
#[target_feature(enable = "sse")]
16481651
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -1658,6 +1661,7 @@ pub unsafe fn _MM_GET_FLUSH_ZERO_MODE() -> u32 {
16581661
///
16591662
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_GET_ROUNDING_MODE)
16601663
#[inline]
1664+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
16611665
#[allow(non_snake_case)]
16621666
#[target_feature(enable = "sse")]
16631667
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -1673,6 +1677,7 @@ pub unsafe fn _MM_GET_ROUNDING_MODE() -> u32 {
16731677
///
16741678
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_SET_EXCEPTION_MASK)
16751679
#[inline]
1680+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
16761681
#[allow(non_snake_case)]
16771682
#[target_feature(enable = "sse")]
16781683
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -1688,6 +1693,7 @@ pub unsafe fn _MM_SET_EXCEPTION_MASK(x: u32) {
16881693
///
16891694
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_SET_EXCEPTION_STATE)
16901695
#[inline]
1696+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
16911697
#[allow(non_snake_case)]
16921698
#[target_feature(enable = "sse")]
16931699
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -1703,6 +1709,7 @@ pub unsafe fn _MM_SET_EXCEPTION_STATE(x: u32) {
17031709
///
17041710
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_SET_FLUSH_ZERO_MODE)
17051711
#[inline]
1712+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
17061713
#[allow(non_snake_case)]
17071714
#[target_feature(enable = "sse")]
17081715
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -1720,6 +1727,7 @@ pub unsafe fn _MM_SET_FLUSH_ZERO_MODE(x: u32) {
17201727
///
17211728
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_MM_SET_ROUNDING_MODE)
17221729
#[inline]
1730+
#[allow(deprecated)] // Deprecated function implemented on top of deprecated function
17231731
#[allow(non_snake_case)]
17241732
#[target_feature(enable = "sse")]
17251733
#[stable(feature = "simd_x86", since = "1.27.0")]
@@ -2834,6 +2842,7 @@ mod tests {
28342842
}
28352843
}
28362844

2845+
#[allow(deprecated)] // FIXME: This test uses deprecated CSR access functions
28372846
#[simd_test(enable = "sse")]
28382847
unsafe fn test_mm_comieq_ss_vs_ucomieq_ss() {
28392848
// If one of the arguments is a quiet NaN `comieq_ss` should signal an
@@ -3258,6 +3267,7 @@ mod tests {
32583267
_mm_sfence();
32593268
}
32603269

3270+
#[allow(deprecated)] // FIXME: This tests functions that are immediate UB
32613271
#[simd_test(enable = "sse")]
32623272
unsafe fn test_mm_getcsr_setcsr_1() {
32633273
let saved_csr = _mm_getcsr();
@@ -3274,6 +3284,7 @@ mod tests {
32743284
assert_eq_m128(r, exp); // first component is a denormalized f32
32753285
}
32763286

3287+
#[allow(deprecated)] // FIXME: This tests functions that are immediate UB
32773288
#[simd_test(enable = "sse")]
32783289
unsafe fn test_mm_getcsr_setcsr_2() {
32793290
// Same as _mm_setcsr_1 test, but with opposite flag value.
@@ -3292,6 +3303,7 @@ mod tests {
32923303
assert_eq_m128(r, exp); // first component is a denormalized f32
32933304
}
32943305

3306+
#[allow(deprecated)] // FIXME: This tests functions that are immediate UB
32953307
#[simd_test(enable = "sse")]
32963308
unsafe fn test_mm_getcsr_setcsr_underflow() {
32973309
_MM_SET_EXCEPTION_STATE(0);

crates/core_arch/src/x86/sse41.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,7 @@ mod tests {
16681668
assert_eq_m128(r, e);
16691669
}
16701670

1671+
#[allow(deprecated)] // FIXME: This test uses deprecated CSR access functions
16711672
#[simd_test(enable = "sse4.1")]
16721673
unsafe fn test_mm_round_sd() {
16731674
let a = _mm_setr_pd(1.5, 3.5);
@@ -1680,6 +1681,7 @@ mod tests {
16801681
assert_eq_m128d(r, e);
16811682
}
16821683

1684+
#[allow(deprecated)] // FIXME: This test uses deprecated CSR access functions
16831685
#[simd_test(enable = "sse4.1")]
16841686
unsafe fn test_mm_round_ss() {
16851687
let a = _mm_setr_ps(1.5, 3.5, 7.5, 15.5);

0 commit comments

Comments
 (0)