aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/simd_32/simd_scalar.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-04 18:07:46 +0000
committerlloyd <[email protected]>2009-11-04 18:07:46 +0000
commit56c3c044215f36fe00c9a8a2e06a84f969996cb7 (patch)
tree6e9bea1b884f16cc1a39818094e21a097e7f501a /src/utils/simd_32/simd_scalar.h
parent9a93fa54a9af6ebc28fafba20af3d78df43c12c8 (diff)
Add an andc operation, in SSE2 and AltiVec, may be useful for Serpent sboxes
Diffstat (limited to 'src/utils/simd_32/simd_scalar.h')
-rw-r--r--src/utils/simd_32/simd_scalar.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/utils/simd_32/simd_scalar.h b/src/utils/simd_32/simd_scalar.h
index 5fc20b462..398503d33 100644
--- a/src/utils/simd_32/simd_scalar.h
+++ b/src/utils/simd_32/simd_scalar.h
@@ -171,6 +171,15 @@ class SIMD_Scalar
return SIMD_Scalar(~R0, ~R1, ~R2, ~R3);
}
+ // (~reg) & other
+ SIMD_Scalar andc(const SIMD_Scalar& other)
+ {
+ return SIMD_Scalar(~R0 & other.R0,
+ ~R1 & other.R1,
+ ~R2 & other.R2,
+ ~R3 & other.R3);
+ }
+
SIMD_Scalar bswap() const
{
return SIMD_Scalar(reverse_bytes(R0),