diff options
author | Jack Lloyd <[email protected]> | 2017-12-10 11:25:22 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-10 11:51:38 -0500 |
commit | 5e69b9a4e4b703247189e46652a41b901de06dae (patch) | |
tree | 688ffe88f81613facbb0d4d44f4b21909290eba8 /src/lib/block | |
parent | 6284d7507130288fa8cc7ece096ecac56a81f8cd (diff) |
Enable using NEON on Clang
Clang doesn't like the way SIMD shifts were implemented, I guess
it fails to inline the constant. Make it a template parameter instead.
Diffstat (limited to 'src/lib/block')
-rw-r--r-- | src/lib/block/serpent/serpent_simd/serpent_simd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/block/serpent/serpent_simd/serpent_simd.cpp b/src/lib/block/serpent/serpent_simd/serpent_simd.cpp index ad4871cf6..8148e321f 100644 --- a/src/lib/block/serpent/serpent_simd/serpent_simd.cpp +++ b/src/lib/block/serpent/serpent_simd/serpent_simd.cpp @@ -27,11 +27,11 @@ namespace Botan { B0 = B0.rotl<13>(); \ B2 = B2.rotl<3>(); \ B1 ^= B0 ^ B2; \ - B3 ^= B2 ^ (B0 << 3); \ + B3 ^= B2 ^ B0.shl<3>(); \ B1 = B1.rotl<1>(); \ B3 = B3.rotl<7>(); \ B0 ^= B1 ^ B3; \ - B2 ^= B3 ^ (B1 << 7); \ + B2 ^= B3 ^ B1.shl<7>(); \ B0 = B0.rotl<5>(); \ B2 = B2.rotl<22>(); \ } while(0) @@ -40,11 +40,11 @@ namespace Botan { do { \ B2 = B2.rotr<22>(); \ B0 = B0.rotr<5>(); \ - B2 ^= B3 ^ (B1 << 7); \ + B2 ^= B3 ^ B1.shl<7>(); \ B0 ^= B1 ^ B3; \ B3 = B3.rotr<7>(); \ B1 = B1.rotr<1>(); \ - B3 ^= B2 ^ (B0 << 3); \ + B3 ^= B2 ^ B0.shl<3>(); \ B1 ^= B0 ^ B2; \ B2 = B2.rotr<3>(); \ B0 = B0.rotr<13>(); \ |