Skip to content

Commit 01c90d2

Browse files
committed
Remove workaround for vector scatter on 32-bit mips
Closes #85 .
1 parent 5719e4b commit 01c90d2

File tree

1 file changed

+2
-26
lines changed

1 file changed

+2
-26
lines changed

src/api/ptr/gather_scatter.rs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -135,32 +135,8 @@ macro_rules! impl_ptr_write {
135135
M: sealed::Mask,
136136
[M; $elem_count]: sealed::SimdArray,
137137
{
138-
// FIXME:
139-
// https://github.com/rust-lang-nursery/packed_simd/issues/85
140-
#[cfg(not(target_arch = "mips"))]
141-
{
142-
use crate::llvm::simd_scatter;
143-
simd_scatter(value.0, self.0, mask.0)
144-
}
145-
#[cfg(target_arch = "mips")]
146-
{
147-
let m_ptr =
148-
&mask as *const Simd<[M; $elem_count]> as *const M;
149-
for i in 0..$elem_count {
150-
let m = ptr::read(m_ptr.add(i));
151-
if m.test() {
152-
let t_ptr = &self
153-
as *const Simd<[*mut T; $elem_count]>
154-
as *mut *mut T;
155-
let v_ptr = &value as *const Simd<[T; $elem_count]>
156-
as *const T;
157-
ptr::write(
158-
ptr::read(t_ptr.add(i)),
159-
ptr::read(v_ptr.add(i)),
160-
);
161-
}
162-
}
163-
}
138+
use crate::llvm::simd_scatter;
139+
simd_scatter(value.0, self.0, mask.0)
164140
}
165141
}
166142

0 commit comments

Comments
 (0)