Skip to content

Commit ede8a74

Browse files
committed
tests/run-make/simd-ffi: fix test crashing on x86 targets ...
... that do not have SSE2 support (e.g. i586)
1 parent c82e0df commit ede8a74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/run-make/simd-ffi/simd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct i32x4([i32; 4]);
2525

2626
extern "C" {
2727
// _mm_sll_epi32
28-
#[cfg(any(target_arch = "x86", target_arch = "x86-64"))]
28+
#[cfg(all(any(target_arch = "x86", target_arch = "x86-64"), target_feature = "sse2"))]
2929
#[link_name = "llvm.x86.sse2.psll.d"]
3030
fn integer(a: i32x4, b: i32x4) -> i32x4;
3131

@@ -42,7 +42,7 @@ extern "C" {
4242
// we still get type checking, but not as detailed as (ab)using
4343
// LLVM.
4444
#[cfg(not(any(
45-
target_arch = "x86",
45+
all(target_arch = "x86", target_feature = "sse2"),
4646
target_arch = "x86-64",
4747
target_arch = "arm",
4848
target_arch = "aarch64"

0 commit comments

Comments
 (0)