23
23
#[ cfg( test) ]
24
24
use stdarch_test:: assert_instr;
25
25
26
- use crate :: mem:: transmute;
27
-
28
- types ! {
29
- #![ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
30
-
31
- /// ARM-specific 32-bit wide vector of two packed `i16`.
32
- pub struct int16x2_t( 2 x i16 ) ;
33
- /// ARM-specific 32-bit wide vector of two packed `u16`.
34
- pub struct uint16x2_t( 2 x u16 ) ;
35
- }
36
-
37
26
extern "unadjusted" {
38
27
#[ link_name = "llvm.arm.smulbb" ]
39
28
fn arm_smulbb ( a : i32 , b : i32 ) -> i32 ;
@@ -85,8 +74,8 @@ extern "unadjusted" {
85
74
#[ inline]
86
75
#[ cfg_attr( test, assert_instr( smulbb) ) ]
87
76
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
88
- pub unsafe fn __smulbb ( a : int16x2_t , b : int16x2_t ) -> i32 {
89
- arm_smulbb ( transmute ( a ) , transmute ( b ) )
77
+ pub unsafe fn __smulbb ( a : i32 , b : i32 ) -> i32 {
78
+ arm_smulbb ( a , b )
90
79
}
91
80
92
81
/// Insert a SMULTB instruction
@@ -96,8 +85,8 @@ pub unsafe fn __smulbb(a: int16x2_t, b: int16x2_t) -> i32 {
96
85
#[ inline]
97
86
#[ cfg_attr( test, assert_instr( smultb) ) ]
98
87
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
99
- pub unsafe fn __smultb ( a : int16x2_t , b : int16x2_t ) -> i32 {
100
- arm_smultb ( transmute ( a ) , transmute ( b ) )
88
+ pub unsafe fn __smultb ( a : i32 , b : i32 ) -> i32 {
89
+ arm_smultb ( a , b )
101
90
}
102
91
103
92
/// Insert a SMULTB instruction
@@ -107,8 +96,8 @@ pub unsafe fn __smultb(a: int16x2_t, b: int16x2_t) -> i32 {
107
96
#[ inline]
108
97
#[ cfg_attr( test, assert_instr( smulbt) ) ]
109
98
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
110
- pub unsafe fn __smulbt ( a : int16x2_t , b : int16x2_t ) -> i32 {
111
- arm_smulbt ( transmute ( a ) , transmute ( b ) )
99
+ pub unsafe fn __smulbt ( a : i32 , b : i32 ) -> i32 {
100
+ arm_smulbt ( a , b )
112
101
}
113
102
114
103
/// Insert a SMULTT instruction
@@ -118,8 +107,8 @@ pub unsafe fn __smulbt(a: int16x2_t, b: int16x2_t) -> i32 {
118
107
#[ inline]
119
108
#[ cfg_attr( test, assert_instr( smultt) ) ]
120
109
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
121
- pub unsafe fn __smultt ( a : int16x2_t , b : int16x2_t ) -> i32 {
122
- arm_smultt ( transmute ( a ) , transmute ( b ) )
110
+ pub unsafe fn __smultt ( a : i32 , b : i32 ) -> i32 {
111
+ arm_smultt ( a , b )
123
112
}
124
113
125
114
/// Insert a SMULWB instruction
@@ -130,8 +119,8 @@ pub unsafe fn __smultt(a: int16x2_t, b: int16x2_t) -> i32 {
130
119
#[ inline]
131
120
#[ cfg_attr( test, assert_instr( smulwb) ) ]
132
121
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
133
- pub unsafe fn __smulwb ( a : int16x2_t , b : i32 ) -> i32 {
134
- arm_smulwb ( transmute ( a ) , b)
122
+ pub unsafe fn __smulwb ( a : i32 , b : i32 ) -> i32 {
123
+ arm_smulwb ( a , b)
135
124
}
136
125
137
126
/// Insert a SMULWT instruction
@@ -142,8 +131,8 @@ pub unsafe fn __smulwb(a: int16x2_t, b: i32) -> i32 {
142
131
#[ inline]
143
132
#[ cfg_attr( test, assert_instr( smulwt) ) ]
144
133
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
145
- pub unsafe fn __smulwt ( a : int16x2_t , b : i32 ) -> i32 {
146
- arm_smulwt ( transmute ( a ) , b)
134
+ pub unsafe fn __smulwt ( a : i32 , b : i32 ) -> i32 {
135
+ arm_smulwt ( a , b)
147
136
}
148
137
149
138
/// Signed saturating addition
@@ -187,8 +176,8 @@ pub unsafe fn __qdbl(a: i32) -> i32 {
187
176
#[ inline]
188
177
#[ cfg_attr( test, assert_instr( smlabb) ) ]
189
178
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
190
- pub unsafe fn __smlabb ( a : int16x2_t , b : int16x2_t , c : i32 ) -> i32 {
191
- arm_smlabb ( transmute ( a ) , transmute ( b ) , c)
179
+ pub unsafe fn __smlabb ( a : i32 , b : i32 , c : i32 ) -> i32 {
180
+ arm_smlabb ( a , b , c)
192
181
}
193
182
194
183
/// Insert a SMLABT instruction
@@ -199,8 +188,8 @@ pub unsafe fn __smlabb(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
199
188
#[ inline]
200
189
#[ cfg_attr( test, assert_instr( smlabt) ) ]
201
190
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
202
- pub unsafe fn __smlabt ( a : int16x2_t , b : int16x2_t , c : i32 ) -> i32 {
203
- arm_smlabt ( transmute ( a ) , transmute ( b ) , c)
191
+ pub unsafe fn __smlabt ( a : i32 , b : i32 , c : i32 ) -> i32 {
192
+ arm_smlabt ( a , b , c)
204
193
}
205
194
206
195
/// Insert a SMLATB instruction
@@ -211,8 +200,8 @@ pub unsafe fn __smlabt(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
211
200
#[ inline]
212
201
#[ cfg_attr( test, assert_instr( smlatb) ) ]
213
202
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
214
- pub unsafe fn __smlatb ( a : int16x2_t , b : int16x2_t , c : i32 ) -> i32 {
215
- arm_smlatb ( transmute ( a ) , transmute ( b ) , c)
203
+ pub unsafe fn __smlatb ( a : i32 , b : i32 , c : i32 ) -> i32 {
204
+ arm_smlatb ( a , b , c)
216
205
}
217
206
218
207
/// Insert a SMLATT instruction
@@ -223,8 +212,8 @@ pub unsafe fn __smlatb(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
223
212
#[ inline]
224
213
#[ cfg_attr( test, assert_instr( smlatt) ) ]
225
214
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
226
- pub unsafe fn __smlatt ( a : int16x2_t , b : int16x2_t , c : i32 ) -> i32 {
227
- arm_smlatt ( transmute ( a ) , transmute ( b ) , c)
215
+ pub unsafe fn __smlatt ( a : i32 , b : i32 , c : i32 ) -> i32 {
216
+ arm_smlatt ( a , b , c)
228
217
}
229
218
230
219
/// Insert a SMLAWB instruction
@@ -235,8 +224,8 @@ pub unsafe fn __smlatt(a: int16x2_t, b: int16x2_t, c: i32) -> i32 {
235
224
#[ inline]
236
225
#[ cfg_attr( test, assert_instr( smlawb) ) ]
237
226
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
238
- pub unsafe fn __smlawb ( a : i32 , b : int16x2_t , c : i32 ) -> i32 {
239
- arm_smlawb ( a, transmute ( b ) , c)
227
+ pub unsafe fn __smlawb ( a : i32 , b : i32 , c : i32 ) -> i32 {
228
+ arm_smlawb ( a, b , c)
240
229
}
241
230
242
231
/// Insert a SMLAWT instruction
@@ -247,8 +236,8 @@ pub unsafe fn __smlawb(a: i32, b: int16x2_t, c: i32) -> i32 {
247
236
#[ inline]
248
237
#[ cfg_attr( test, assert_instr( smlawt) ) ]
249
238
#[ unstable( feature = "stdarch_arm_dsp" , issue = "117237" ) ]
250
- pub unsafe fn __smlawt ( a : i32 , b : int16x2_t , c : i32 ) -> i32 {
251
- arm_smlawt ( a, transmute ( b ) , c)
239
+ pub unsafe fn __smlawt ( a : i32 , b : i32 , c : i32 ) -> i32 {
240
+ arm_smlawt ( a, b , c)
252
241
}
253
242
254
243
#[ cfg( test) ]
0 commit comments