Implementation notes: amd64, h8atom, crypto_aead/morus1280128v2

Computer: h8atom
Microarchitecture: amd64; Bonnell (30661)
Architecture: amd64
CPU ID: GenuineIntel-00030661-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: morus1280128v2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
2175612123 0 028012 816 856T:sse2clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
2536813515 0 027148 816 856T:sse2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
2586512872 0 027684 816 856T:sse2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
2589312904 0 028892 816 856T:sse2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
259708478 0 021390 808 856T:sse2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
2608910369 0 026605 784 928T:sse2gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
3013514878 0 031125 784 928T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
3140914878 0 031125 784 928T:ref64gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
519686006 0 020925 784 928T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
522907046 0 021948 816 856T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
525287046 0 023124 816 856T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
528997046 0 021948 816 856T:ref64clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
533477046 0 023124 816 856T:ref64clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
535645511 0 018712 760 896T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
538165511 0 018712 760 896T:ref64gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
538795623 0 018590 808 856T:ref64clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
546986006 0 020925 784 928T:ref64gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
547336778 0 022772 816 856T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
553636778 0 022772 816 856T:ref64clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
562805623 0 018590 808 856T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
574847596 0 021340 816 856T:ref64clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
575477596 0 021340 816 856T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121520231212
598645875 0 020340 776 928T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212
599835875 0 020340 776 928T:ref64gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121520231212

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:55:13: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
encrypt.c: state[0] = XOR256(state[0], state[3]);
encrypt.c: ^
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.c:55:13: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.c:56:30: error: always_inline function '_mm256_and_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:26:27: note: expanded from macro 'AND256'
encrypt.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.c:56:30: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:26:27: note: expanded from macro 'AND256'
encrypt.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.c:56:13: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.c: ...

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:avx2
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:avx2
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:avx2
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:avx2
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:avx2

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.c: encrypt.c: In function 'morus_stateupdate':
encrypt.c: encrypt.c:53:6: note: the ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
encrypt.c: 53 | void morus_stateupdate(__m256i msgblk, __m256i *state)
encrypt.c: | ^~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:55:18: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
encrypt.c: 55 | state[0] = XOR256(state[0], state[3]);
encrypt.c: | ^
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c: from encrypt.c:2:
encrypt.c: encrypt.c: In function 'morus_enc_aut_step':
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:1071:1: error: inlining failed in call to 'always_inline' '_mm256_permute4x64_epi64': target specific option mismatch
encrypt.c: 1071 | _mm256_permute4x64_epi64 (__m256i __X, const int __M)
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:41:27: note: called from here
encrypt.c: 41 | #define ROTL256_64(x) _mm256_permute4x64_epi64((x), _MM_SHUFFLE(2,1,0,3)) /*Rotate x by 64-bit positions to the left*/
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:207:20: note: in expansion of macro 'ROTL256_64'
encrypt.c: 207 | state[2] = ROTL256_64(state[2]);
encrypt.c: | ^~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c: from encrypt.c:2:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:574:1: error: inlining failed in call to 'always_inline' '_mm256_or_si256': target specific option mismatch
encrypt.c: 574 | _mm256_or_si256 (__m256i __A, __m256i __B)
encrypt.c: | ^~~~~~~~~~~~~~~
encrypt.c: encrypt.c:28:27: note: called from here
encrypt.c: ...

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx2
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx2
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx2
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:avx2

Compiler output

Implementation: T:sse2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_initialization_key_256':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_tag_generation':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_tag_verification':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_enc_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o):encrypt.c:(.text+0x...): more undefined references to `morus_stateupdate' follow
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 2, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:sse2
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:sse2

Compiler output

Implementation: T:sse2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_initialization_key_256':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_tag_generation':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_tag_verification':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `morus_enc_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o):encrypt.c:(.text+0x...): more undefined references to `morus_stateupdate' follow
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `crypto_aead_morus1280128v2_sse2_timingleaks_encrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: libcrypto_aead_morus1280128v2.a(encrypt.o): in function `crypto_aead_morus1280128v2_sse2_timingleaks_decrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_dec_aut_step'
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:sse2