about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-10 15:29:40 +0000
committerbors <bors@rust-lang.org>2019-05-10 15:29:40 +0000
commitcff1bdbd77d29a28a94ff9f5bf1e1c84e5bb6259 (patch)
treed25f94d26cd00383f33ca22b1df396293cae2061
parent0ac53da03dad79655e2f3e65a58f94a2f3314d5f (diff)
parent9a0a87a654303c69856d55dac419a2c440efc3d4 (diff)
downloadrust-cff1bdbd77d29a28a94ff9f5bf1e1c84e5bb6259.tar.gz
rust-cff1bdbd77d29a28a94ff9f5bf1e1c84e5bb6259.zip
Auto merge of #60588 - cuviper:be-simd-swap, r=alexcrichton
Revert "Disable big-endian simd in swap_nonoverlapping_bytes"

This reverts commit 77bd4dc65406ba3cedbc779e6f6280868231912e (#43159).

Issue #42778 was formerly easy to reproduce on two big-endian targets,
`powerpc64` and `s390x`, so we disabled SIMD on this function for all
big-endian targets as a workaround.

I have re-tested this code on `powerpc64` and `s390x`, each with the
bundled LLVM 8 and with external LLVM 7 and LLVM 6, and the problems no
longer appear. So it seems safe to remove this workaround, although I'm
still a little uncomfortable that we never found a root-cause...

Closes #42778.
r? @arielb1
-rw-r--r--src/libcore/ptr.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libcore/ptr.rs b/src/libcore/ptr.rs
index 6355bcdcab2..a4e7ea5eff5 100644
--- a/src/libcore/ptr.rs
+++ b/src/libcore/ptr.rs
@@ -374,10 +374,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
     // #[repr(simd)], even if we don't actually use this struct directly.
     //
     // FIXME repr(simd) broken on emscripten and redox
-    // It's also broken on big-endian powerpc64 and s390x.  #42778
-    #[cfg_attr(not(any(target_os = "emscripten", target_os = "redox",
-                       target_endian = "big")),
-               repr(simd))]
+    #[cfg_attr(not(any(target_os = "emscripten", target_os = "redox")), repr(simd))]
     struct Block(u64, u64, u64, u64);
     struct UnalignedBlock(u64, u64, u64, u64);