@@ -35,8 +35,8 @@ unsafe extern "C" {
35
35
#[ target_feature( enable = "aes" ) ]
36
36
#[ cfg_attr( test, assert_instr( aesdec) ) ]
37
37
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
38
- pub unsafe fn _mm_aesdec_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
39
- aesdec ( a, round_key)
38
+ pub fn _mm_aesdec_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
39
+ unsafe { aesdec ( a, round_key) }
40
40
}
41
41
42
42
/// Performs the last round of an AES decryption flow on data (state) in `a`.
@@ -46,8 +46,8 @@ pub unsafe fn _mm_aesdec_si128(a: __m128i, round_key: __m128i) -> __m128i {
46
46
#[ target_feature( enable = "aes" ) ]
47
47
#[ cfg_attr( test, assert_instr( aesdeclast) ) ]
48
48
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
49
- pub unsafe fn _mm_aesdeclast_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
50
- aesdeclast ( a, round_key)
49
+ pub fn _mm_aesdeclast_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
50
+ unsafe { aesdeclast ( a, round_key) }
51
51
}
52
52
53
53
/// Performs one round of an AES encryption flow on data (state) in `a`.
@@ -57,8 +57,8 @@ pub unsafe fn _mm_aesdeclast_si128(a: __m128i, round_key: __m128i) -> __m128i {
57
57
#[ target_feature( enable = "aes" ) ]
58
58
#[ cfg_attr( test, assert_instr( aesenc) ) ]
59
59
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
60
- pub unsafe fn _mm_aesenc_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
61
- aesenc ( a, round_key)
60
+ pub fn _mm_aesenc_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
61
+ unsafe { aesenc ( a, round_key) }
62
62
}
63
63
64
64
/// Performs the last round of an AES encryption flow on data (state) in `a`.
@@ -68,8 +68,8 @@ pub unsafe fn _mm_aesenc_si128(a: __m128i, round_key: __m128i) -> __m128i {
68
68
#[ target_feature( enable = "aes" ) ]
69
69
#[ cfg_attr( test, assert_instr( aesenclast) ) ]
70
70
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
71
- pub unsafe fn _mm_aesenclast_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
72
- aesenclast ( a, round_key)
71
+ pub fn _mm_aesenclast_si128 ( a : __m128i , round_key : __m128i ) -> __m128i {
72
+ unsafe { aesenclast ( a, round_key) }
73
73
}
74
74
75
75
/// Performs the `InvMixColumns` transformation on `a`.
@@ -79,8 +79,8 @@ pub unsafe fn _mm_aesenclast_si128(a: __m128i, round_key: __m128i) -> __m128i {
79
79
#[ target_feature( enable = "aes" ) ]
80
80
#[ cfg_attr( test, assert_instr( aesimc) ) ]
81
81
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
82
- pub unsafe fn _mm_aesimc_si128 ( a : __m128i ) -> __m128i {
83
- aesimc ( a)
82
+ pub fn _mm_aesimc_si128 ( a : __m128i ) -> __m128i {
83
+ unsafe { aesimc ( a) }
84
84
}
85
85
86
86
/// Assist in expanding the AES cipher key.
@@ -95,9 +95,9 @@ pub unsafe fn _mm_aesimc_si128(a: __m128i) -> __m128i {
95
95
#[ cfg_attr( test, assert_instr( aeskeygenassist, IMM8 = 0 ) ) ]
96
96
#[ rustc_legacy_const_generics( 1 ) ]
97
97
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
98
- pub unsafe fn _mm_aeskeygenassist_si128 < const IMM8 : i32 > ( a : __m128i ) -> __m128i {
98
+ pub fn _mm_aeskeygenassist_si128 < const IMM8 : i32 > ( a : __m128i ) -> __m128i {
99
99
static_assert_uimm_bits ! ( IMM8 , 8 ) ;
100
- aeskeygenassist ( a, IMM8 as u8 )
100
+ unsafe { aeskeygenassist ( a, IMM8 as u8 ) }
101
101
}
102
102
103
103
#[ cfg( test) ]
0 commit comments