@@ -19,10 +19,10 @@ use crate::{
19
19
#[ inline]
20
20
#[ cfg_attr( all( test, target_feature = "sse2" ) , assert_instr( pause) ) ]
21
21
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
22
- pub unsafe fn _mm_pause ( ) {
22
+ pub fn _mm_pause ( ) {
23
23
// note: `pause` is guaranteed to be interpreted as a `nop` by CPUs without
24
24
// the SSE2 target-feature - therefore it does not require any target features
25
- pause ( )
25
+ unsafe { pause ( ) }
26
26
}
27
27
28
28
/// 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) {
49
49
#[ target_feature( enable = "sse2" ) ]
50
50
#[ cfg_attr( test, assert_instr( lfence) ) ]
51
51
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
52
- pub unsafe fn _mm_lfence ( ) {
53
- lfence ( )
52
+ pub fn _mm_lfence ( ) {
53
+ unsafe { lfence ( ) }
54
54
}
55
55
56
56
/// Performs a serializing operation on all load-from-memory and store-to-memory
@@ -65,8 +65,8 @@ pub unsafe fn _mm_lfence() {
65
65
#[ target_feature( enable = "sse2" ) ]
66
66
#[ cfg_attr( test, assert_instr( mfence) ) ]
67
67
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
68
- pub unsafe fn _mm_mfence ( ) {
69
- mfence ( )
68
+ pub fn _mm_mfence ( ) {
69
+ unsafe { mfence ( ) }
70
70
}
71
71
72
72
/// Adds packed 8-bit integers in `a` and `b`.
@@ -3142,7 +3142,7 @@ mod tests {
3142
3142
3143
3143
#[ test]
3144
3144
fn test_mm_pause ( ) {
3145
- unsafe { _mm_pause ( ) }
3145
+ _mm_pause ( )
3146
3146
}
3147
3147
3148
3148
#[ simd_test( enable = "sse2" ) ]
0 commit comments