@@ -171,7 +171,9 @@ pub unsafe fn _mm_max_ps(a: f32x4, b: f32x4) -> f32x4 {
171
171
/// Bitwise AND of packed single-precision (32-bit) floating-point elements.
172
172
#[ inline( always) ]
173
173
#[ target_feature = "+sse" ]
174
- #[ cfg_attr( test, assert_instr( andps) ) ]
174
+ // i586 only seems to generate plain `and` instructions, so ignore it.
175
+ #[ cfg_attr( all( test, any( target_arch = "x86_64" , target_feature = "sse2" ) ) ,
176
+ assert_instr( andps) ) ]
175
177
pub unsafe fn _mm_and_ps ( a : f32x4 , b : f32x4 ) -> f32x4 {
176
178
let aa: i32x4 = mem:: transmute ( a) ;
177
179
let bb: i32x4 = mem:: transmute ( b) ;
@@ -183,7 +185,9 @@ pub unsafe fn _mm_and_ps(a: f32x4, b: f32x4) -> f32x4 {
183
185
/// Computes `!a & b` for each bit in `a` and `b`.
184
186
#[ inline( always) ]
185
187
#[ target_feature = "+sse" ]
186
- #[ cfg_attr( test, assert_instr( andnps) ) ]
188
+ // i586 only seems to generate plain `not` and `and` instructions, so ignore it.
189
+ #[ cfg_attr( all( test, any( target_arch = "x86_64" , target_feature = "sse2" ) ) ,
190
+ assert_instr( andnps) ) ]
187
191
pub unsafe fn _mm_andnot_ps ( a : f32x4 , b : f32x4 ) -> f32x4 {
188
192
let aa: i32x4 = mem:: transmute ( a) ;
189
193
let bb: i32x4 = mem:: transmute ( b) ;
@@ -193,7 +197,9 @@ pub unsafe fn _mm_andnot_ps(a: f32x4, b: f32x4) -> f32x4 {
193
197
/// Bitwise OR of packed single-precision (32-bit) floating-point elements.
194
198
#[ inline( always) ]
195
199
#[ target_feature = "+sse" ]
196
- #[ cfg_attr( test, assert_instr( orps) ) ]
200
+ // i586 only seems to generate plain `or` instructions, so we ignore it.
201
+ #[ cfg_attr( all( test, any( target_arch = "x86_64" , target_feature = "sse2" ) ) ,
202
+ assert_instr( orps) ) ]
197
203
pub unsafe fn _mm_or_ps ( a : f32x4 , b : f32x4 ) -> f32x4 {
198
204
let aa: i32x4 = mem:: transmute ( a) ;
199
205
let bb: i32x4 = mem:: transmute ( b) ;
@@ -204,7 +210,9 @@ pub unsafe fn _mm_or_ps(a: f32x4, b: f32x4) -> f32x4 {
204
210
/// elements.
205
211
#[ inline( always) ]
206
212
#[ target_feature = "+sse" ]
207
- #[ cfg_attr( test, assert_instr( xorps) ) ]
213
+ // i586 only seems to generate plain `xor` instructions, so we ignore it.
214
+ #[ cfg_attr( all( test, any( target_arch = "x86_64" , target_feature = "sse2" ) ) ,
215
+ assert_instr( xorps) ) ]
208
216
pub unsafe fn _mm_xor_ps ( a : f32x4 , b : f32x4 ) -> f32x4 {
209
217
let aa: i32x4 = mem:: transmute ( a) ;
210
218
let bb: i32x4 = mem:: transmute ( b) ;
0 commit comments