aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/simd_32/simd_sse.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-26 17:59:57 +0000
committerlloyd <[email protected]>2009-10-26 17:59:57 +0000
commitce2f07c4fc8b6967bc1418b4ab8770393c64bc80 (patch)
treec00284befe1f3e00f3e0e8c491fa315bb9e07192 /src/utils/simd_32/simd_sse.h
parent49896908c8a7893586271e353c431bb91b5215a8 (diff)
Add subtraction operators to SIMD_32 classes, needed for XTEA decrypt
Diffstat (limited to 'src/utils/simd_32/simd_sse.h')
-rw-r--r--src/utils/simd_32/simd_sse.h10
1 files changed, 10 insertions, 0 deletions
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);