Rollup merge of #42762 - jackpot51:patch-1, r=sfackler

Disable repr(simd) in mem::swap on Redox

This addresses https://github.com/rust-lang/rust/issues/42761
This commit is contained in:
Corey Farwell 2017-06-21 10:40:16 -04:00 committed by GitHub
commit 30a7bfcaae

View File

@ -504,8 +504,8 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
// Haswell E processors. LLVM is more able to optimize if we give a struct a // Haswell E processors. LLVM is more able to optimize if we give a struct a
// #[repr(simd)], even if we don't actually use this struct directly. // #[repr(simd)], even if we don't actually use this struct directly.
// //
// FIXME repr(simd) broken on emscripten // FIXME repr(simd) broken on emscripten and redox
#[cfg_attr(not(target_os = "emscripten"), repr(simd))] #[cfg_attr(not(any(target_os = "emscripten", target_os = "redox")), repr(simd))]
struct Block(u64, u64, u64, u64); struct Block(u64, u64, u64, u64);
struct UnalignedBlock(u64, u64, u64, u64); struct UnalignedBlock(u64, u64, u64, u64);