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