Skip to content

Commit

Permalink
tests/run-make/simd-ffi: fix test crashing on x86 targets ...
Browse files Browse the repository at this point in the history
... that do not have SSE2 support (e.g. i586)
  • Loading branch information
liushuyu committed Nov 14, 2024
1 parent c82e0df commit ede8a74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/run-make/simd-ffi/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct i32x4([i32; 4]);

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

Expand All @@ -42,7 +42,7 @@ extern "C" {
// we still get type checking, but not as detailed as (ab)using
// LLVM.
#[cfg(not(any(
target_arch = "x86",
all(target_arch = "x86", target_feature = "sse2"),
target_arch = "x86-64",
target_arch = "arm",
target_arch = "aarch64"
Expand Down

0 comments on commit ede8a74

Please sign in to comment.