Implementation notes: amd64, samba, crypto_aead/pi16cipher128v2

Computer: samba
Microarchitecture: amd64; Skylake (506e3)
Architecture: amd64
CPU ID: GenuineIntel-000506e3-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: pi16cipher128v2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
14187220142 8 035844 820 1088T:goptvgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
14369618251 8 033499 812 1088T:goptvgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
17318526168 8 044012 820 1088T:goptvgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
2151079004 8 023135 796 1056T:goptvgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
2745396321 8 023115 852 1024T:ref3clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
2818736177 8 024515 852 1088T:ref3clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
3142847446 8 024227 852 1024T:ref2clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
3194927434 8 025771 852 1088T:ref2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
3290126425 8 024459 852 1056T:ref3clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
3574777096 8 025139 852 1056T:ref2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
3873265973 8 020203 852 1024T:ref3clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
3918207011 8 022708 820 1088T:ref3gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
3961045477 8 020723 812 1088T:ref3gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
4270884666 8 019701 844 1088T:ref3clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
4938398441 8 026244 820 1088T:ref3gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
5546345025 8 019039 796 1056T:ref3gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
11085257229 8 022972 820 1088T:ref2gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
12637066263 8 020507 852 1024T:ref2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
15138035392 8 019423 796 1056T:ref2gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
15919095931 8 021203 812 1088T:ref2gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
16691615014 8 020069 844 1088T:ref2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212

Test failure

Implementation: T:optimized_nonSSE
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
error 111
crypto_aead_encrypt returns more than crypto_aead_ABYTES extra bytes

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

Compiler output

Implementation: T:goptv
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
pi-cipher.c: pi-cipher.c:286:9: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
pi-cipher.c: n_t += __builtin_shuffle(y, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:286:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: n_t += __builtin_shuffle(y, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:287:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: n_t += __builtin_shuffle(y, n_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:290:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: n_t ^= __builtin_shuffle(n_t, n_x_1) ^ __builtin_shuffle(n_t, n_x_2);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:305:9: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
pi-cipher.c: m_t += __builtin_shuffle(x, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:305:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: m_t += __builtin_shuffle(x, g_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:306:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: m_t += __builtin_shuffle(x, m_mask);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:309:6: error: cannot convert between scalar type 'int' and vector type 'vchunk_t' (vector of 4 'word_t' values) as implicit conversion would cause truncation
pi-cipher.c: m_t ^= __builtin_shuffle(m_t, m_x_1) ^ __builtin_shuffle(m_t, m_x_2);
pi-cipher.c: ^
pi-cipher.c: pi-cipher.c:354:9: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]
pi-cipher.c: ...

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

Compiler output

Implementation: T:goptv
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE
pi-cipher.c: pi-cipher.c: In function 'pi16_init':
pi-cipher.c: pi-cipher.c:842:5: warning: 'pi' accessing 32 bytes in a region of size 8 [-Wstringop-overflow=]
pi-cipher.c: 842 | pi(ctx->cis);
pi-cipher.c: | ^~~~~~~~~~~~
pi-cipher.c: pi-cipher.c:842:5: note: referencing argument 1 of type 'word_t (*)[4]' {aka 'short unsigned int (*)[4]'}
pi-cipher.c: pi-cipher.c:649:13: note: in a call to function 'pi'
pi-cipher.c: 649 | static void pi(
pi-cipher.c: | ^~

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

Compiler output

Implementation: T:ref2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
pi-cipher.c: In function 'mu',
pi-cipher.c: inlined from 'ast' at pi-cipher.c:257:5:
pi-cipher.c: pi-cipher.c:226:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 226 | phi(t, x, mu_const, mu_v_const, mu_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c: In function 'ast':
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 4 of type 'const uint8_t *' {aka 'const unsigned char *'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~
pi-cipher.c: In function 'ny',
pi-cipher.c: inlined from 'ast' at pi-cipher.c:258:5:
pi-cipher.c: pi-cipher.c:237:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 237 | phi(dest, x, ny_const, ny_v_const, ny_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c: In function 'ast':
pi-cipher.c: pi-cipher.c:237:5: note: referencing argument 4 of type 'const uint8_t *' {aka 'const unsigned char *'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~

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

Compiler output

Implementation: T:ref2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE
pi-cipher.c: In function 'mu',
pi-cipher.c: inlined from 'ast' at pi-cipher.c:257:5,
pi-cipher.c: inlined from 'e1' at pi-cipher.c:271:9,
pi-cipher.c: inlined from 'pi' at pi-cipher.c:305:9:
pi-cipher.c: pi-cipher.c:226:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 226 | phi(t, x, mu_const, mu_v_const, mu_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c: In function 'pi':
pi-cipher.c: pi-cipher.c:226:5: note: referencing argument 4 of type 'const uint8_t *' {aka 'const unsigned char *'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~
pi-cipher.c: In function 'ny',
pi-cipher.c: inlined from 'ast' at pi-cipher.c:258:5,
pi-cipher.c: inlined from 'e1' at pi-cipher.c:271:9,
pi-cipher.c: inlined from 'pi' at pi-cipher.c:305:9:
pi-cipher.c: pi-cipher.c:237:5: warning: 'phi' reading 8 bytes from a region of size 4 [-Wstringop-overread]
pi-cipher.c: 237 | phi(dest, x, ny_const, ny_v_const, ny_rot_const);
pi-cipher.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pi-cipher.c: pi-cipher.c: In function 'pi':
pi-cipher.c: pi-cipher.c:237:5: note: referencing argument 4 of type 'const uint8_t *' {aka 'const unsigned char *'}
pi-cipher.c: pi-cipher.c:175:13: note: in a call to function 'phi'
pi-cipher.c: 175 | static void phi(
pi-cipher.c: | ^~~
pi-cipher.c: In function 'mu',
pi-cipher.c: ...

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