66#[ cfg( target_arch = "x86" ) ]
77#[ inline( always) ]
88#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
9+ #[ rustc_deprecated( since = "1.29.0" , reason = "See issue #51810 - use inline assembly instead" ) ]
10+ #[ doc( hidden) ]
911pub 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.29.0" , reason = "See issue #51810 - use inline assembly instead" ) ]
24+ #[ doc( hidden) ]
2125pub unsafe fn __readeflags ( ) -> u64 {
2226 let eflags: u64 ;
2327 asm ! ( "pushfq; popq $0" : "=r" ( eflags) : : : "volatile" ) ;
@@ -30,6 +34,8 @@ pub unsafe fn __readeflags() -> u64 {
3034#[ cfg( target_arch = "x86" ) ]
3135#[ inline( always) ]
3236#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
37+ #[ rustc_deprecated( since = "1.29.0" , reason = "See issue #51810 - use inline assembly instead" ) ]
38+ #[ doc( hidden) ]
3339pub unsafe fn __writeeflags ( eflags : u32 ) {
3440 asm ! ( "pushl $0; popfd" : : "r" ( eflags) : "cc" , "flags" : "volatile" ) ;
3541}
@@ -40,6 +46,8 @@ pub unsafe fn __writeeflags(eflags: u32) {
4046#[ cfg( target_arch = "x86_64" ) ]
4147#[ inline( always) ]
4248#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
49+ #[ rustc_deprecated( since = "1.29.0" , reason = "See issue #51810 - use inline assembly instead" ) ]
50+ #[ doc( hidden) ]
4351pub unsafe fn __writeeflags ( eflags : u64 ) {
4452 asm ! ( "pushq $0; popfq" : : "r" ( eflags) : "cc" , "flags" : "volatile" ) ;
4553}
@@ -49,6 +57,7 @@ mod tests {
4957 use coresimd:: x86:: * ;
5058
5159 #[ test]
60+ #[ allow( deprecated) ]
5261 fn test_eflags ( ) {
5362 unsafe {
5463 // reads eflags, writes them back, reads them again,
0 commit comments