@@ -19,10 +19,10 @@ use crate::{
1919#[ inline]
2020#[ cfg_attr( all( test, target_feature = "sse2" ) , assert_instr( pause) ) ]
2121#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
22- pub unsafe fn _mm_pause ( ) {
22+ pub fn _mm_pause ( ) {
2323 // note: `pause` is guaranteed to be interpreted as a `nop` by CPUs without
2424 // the SSE2 target-feature - therefore it does not require any target features
25- pause ( )
25+ unsafe { pause ( ) }
2626}
2727
2828/// Invalidates and flushes the cache line that contains `p` from all levels of
@@ -49,8 +49,8 @@ pub unsafe fn _mm_clflush(p: *const u8) {
4949#[ target_feature( enable = "sse2" ) ]
5050#[ cfg_attr( test, assert_instr( lfence) ) ]
5151#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
52- pub unsafe fn _mm_lfence ( ) {
53- lfence ( )
52+ pub fn _mm_lfence ( ) {
53+ unsafe { lfence ( ) }
5454}
5555
5656/// Performs a serializing operation on all load-from-memory and store-to-memory
@@ -65,8 +65,8 @@ pub unsafe fn _mm_lfence() {
6565#[ target_feature( enable = "sse2" ) ]
6666#[ cfg_attr( test, assert_instr( mfence) ) ]
6767#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
68- pub unsafe fn _mm_mfence ( ) {
69- mfence ( )
68+ pub fn _mm_mfence ( ) {
69+ unsafe { mfence ( ) }
7070}
7171
7272/// Adds packed 8-bit integers in `a` and `b`.
@@ -3149,7 +3149,7 @@ mod tests {
31493149
31503150 #[ test]
31513151 fn test_mm_pause ( ) {
3152- unsafe { _mm_pause ( ) }
3152+ _mm_pause ( )
31533153 }
31543154
31553155 #[ simd_test( enable = "sse2" ) ]
0 commit comments