Skip to content

Commit 38ed665

Browse files
gnzlbgalexcrichton
authored andcommitted
bugfix: cfg(tests) should be cfg(test) (rust-lang#450)
1 parent 217ba4e commit 38ed665

File tree

2 files changed

+5
-18
lines changed

2 files changed

+5
-18
lines changed

coresimd/powerpc/altivec.rs

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -330,27 +330,14 @@ where
330330
a.vec_add(b)
331331
}
332332

333-
#[cfg(tests)]
333+
#[cfg(all(test, target_arch = "powerpc64"))]
334334
mod tests {
335-
use coresimd::arch::powerpc::*;
335+
#[cfg(target_arch = "powerpc64")]
336+
use coresimd::arch::powerpc64::*;
336337
use simd::*;
337338
use stdsimd_test::simd_test;
338339

339-
#[simd_test = "altivec"]
340-
unsafe fn endianness() {
341-
let x = i32x4::new(0, 1, 2, 3);
342-
for i in 0..4 {
343-
assert_eq!(x.extract(i), i);
344-
}
345-
346-
let x: i16x8 = x.into_bits();
347-
let e: i16x8 = i16x8::new(0, 0, 0, 0, 0, 0, 0, 0);
348-
for i in 0..8 {
349-
assert_eq!(x.extract(i), e.extract(i));
350-
}
351-
}
352-
353-
#[simd_test = "altivec"]
340+
#[simd_test(enable = "altivec")]
354341
unsafe fn vec_add_i32x4_i32x4() {
355342
let x = i32x4::new(1, 2, 3, 4);
356343
let y = i32x4::new(4, 3, 2, 1);

crates/simd-test-macro/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub fn simd_test(
6868
"i686" | "x86_64" | "i586" => "is_x86_feature_detected",
6969
"arm" | "armv7" => "is_arm_feature_detected",
7070
"aarch64" => "is_aarch64_feature_detected",
71-
"powerpc64" => "is_powerpc64_feature_detected",
71+
"powerpc64" | "powerpc64le" => "is_powerpc64_feature_detected",
7272
"mips" | "mipsel" => {
7373
// FIXME:
7474
// On MIPS CI run-time feature detection always returns false due

0 commit comments

Comments
 (0)