1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
extern crate llvmint; use super::super::super::super::*; use super::super::super::super::core::*; use super::super::SSE2; impl CmpEq<M16<i8>> for SSE2 { #[inline(always)] fn cmpeq(&self, a: M16<i8>, b: M16<i8>) -> M16<i8> { Multi::wrap(a.unwrap() == b.unwrap()) } } impl CmpGt<M16<i8>> for SSE2 { #[inline(always)] fn cmpgt(&self, a: M16<i8>, b: M16<i8>) -> M16<i8> { Multi::wrap(a.unwrap() > b.unwrap()) } } impl CmpLt<M16<i8>> for SSE2 { #[inline(always)] fn cmplt(&self, a: M16<i8>, b: M16<i8>) -> M16<i8> { Multi::wrap(a.unwrap() < b.unwrap()) } } impl Set1<M16<i8>> for SSE2 { #[inline(always)] fn set1(&self, a: i8) -> M16<i8> { Twice{ lo: Twice{ lo: Twice{ lo: Twice{lo: a, hi: a}, hi: Twice{lo: a, hi: a} }, hi: Twice{ lo: Twice{lo: a, hi: a}, hi: Twice{lo: a, hi: a} }, }, hi: Twice{ lo: Twice{ lo: Twice{lo: a, hi: a}, hi: Twice{lo: a, hi: a} }, hi: Twice{ lo: Twice{lo: a, hi: a}, hi: Twice{lo: a, hi: a} } } } } } impl Add<M16<i8>> for SSE2 { #[inline(always)] fn add(&self, a: M16<i8>, b: M16<i8>) -> M16<i8> { Multi::wrap(a.unwrap() + b.unwrap()) } } impl AddS<M16<i8>> for SSE2 { #[inline(always)] fn adds(&self, a: M16<i8>, b: M16<i8>) -> M16<i8> { unsafe { Multi::wrap(llvmint::x86::sse2_padds_b(a.unwrap(), b.unwrap())) } } }