From ce2f07c4fc8b6967bc1418b4ab8770393c64bc80 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 26 Oct 2009 17:59:57 +0000 Subject: Add subtraction operators to SIMD_32 classes, needed for XTEA decrypt --- src/utils/simd_32/simd_sse.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/utils/simd_32/simd_sse.h') diff --git a/src/utils/simd_32/simd_sse.h b/src/utils/simd_32/simd_sse.h index d9135f1c7..d2ef4b211 100644 --- a/src/utils/simd_32/simd_sse.h +++ b/src/utils/simd_32/simd_sse.h @@ -70,6 +70,16 @@ class SIMD_SSE2 return _mm_add_epi32(reg, other.reg); } + void operator-=(const SIMD_SSE2& other) + { + reg = _mm_sub_epi32(reg, other.reg); + } + + SIMD_SSE2 operator-(const SIMD_SSE2& other) const + { + return _mm_sub_epi32(reg, other.reg); + } + void operator^=(const SIMD_SSE2& other) { reg = _mm_xor_si128(reg, other.reg); -- cgit v1.2.3