Skip to content

Commit 2cf8650

Browse files
committed
deprecate read/write eflags
1 parent 87f25c7 commit 2cf8650

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

coresimd/x86/eflags.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#[cfg(target_arch = "x86")]
77
#[inline(always)]
88
#[stable(feature = "simd_x86", since = "1.27.0")]
9+
#[rustc_deprecated(since = "1.28.0", reason = "See issue #51810 - use inline assembly instead")]
10+
#[doc(hidden)]
911
pub unsafe fn __readeflags() -> u32 {
1012
let eflags: u32;
1113
asm!("pushfd; popl $0" : "=r"(eflags) : : : "volatile");
@@ -18,6 +20,8 @@ pub unsafe fn __readeflags() -> u32 {
1820
#[cfg(target_arch = "x86_64")]
1921
#[inline(always)]
2022
#[stable(feature = "simd_x86", since = "1.27.0")]
23+
#[rustc_deprecated(since = "1.28.0", reason = "See issue #51810 - use inline assembly instead")]
24+
#[doc(hidden)]
2125
pub unsafe fn __readeflags() -> u64 {
2226
let eflags: u64;
2327
asm!("pushfq; popq $0" : "=r"(eflags) : : : "volatile");
@@ -29,7 +33,9 @@ pub unsafe fn __readeflags() -> u64 {
2933
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=__writeeflags)
3034
#[cfg(target_arch = "x86")]
3135
#[inline(always)]
32-
#[stable(feature = "simd_x86", since = "1.27.0")]
36+
#[stable(feature = "simd_x86", since = "1.27.0", reason = "See issue #51810 - use inline assembly instead")]
37+
#[rustc_deprecated(since = "1.28.0")]
38+
#[doc(hidden)]
3339
pub unsafe fn __writeeflags(eflags: u32) {
3440
asm!("pushl $0; popfd" : : "r"(eflags) : "cc", "flags" : "volatile");
3541
}
@@ -39,7 +45,9 @@ pub unsafe fn __writeeflags(eflags: u32) {
3945
/// [Intel's documentation](https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=__writeeflags)
4046
#[cfg(target_arch = "x86_64")]
4147
#[inline(always)]
42-
#[stable(feature = "simd_x86", since = "1.27.0")]
48+
#[stable(feature = "simd_x86", since = "1.27.0", reason = "See issue #51810 - use inline assembly instead")]
49+
#[rustc_deprecated(since = "1.28.0")]
50+
#[doc(hidden)]
4351
pub unsafe fn __writeeflags(eflags: u64) {
4452
asm!("pushq $0; popfq" : : "r"(eflags) : "cc", "flags" : "volatile");
4553
}

0 commit comments

Comments
 (0)