Implementation notes: amd64, samba, crypto_aead/pi32cipher256v2

Computer: samba
Microarchitecture: amd64; Skylake (506e3)
Architecture: amd64
CPU ID: GenuineIntel-000506e3-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: pi32cipher256v2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
5766718328 8 034148 820 1088T:goptvgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
5886516779 8 032051 812 1088T:goptvgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
5894921734 8 039708 820 1088T:goptvgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1036788523 8 022655 796 1056T:goptvgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1387316113 8 022995 852 1024T:ref3clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1470957407 8 025779 852 1088T:ref3clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1568807685 8 024595 852 1024T:ref2clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1571119680 8 028035 852 1088T:ref2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1629567247 8 025323 852 1056T:ref3clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1755609976 8 027907 852 1056T:ref2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
1775736091 8 020379 852 1024T:ref3clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
2003235585 8 020851 812 1088T:ref3gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
2032337231 8 023044 820 1088T:ref3gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
2068144574 8 019629 844 1088T:ref3clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
2206825044 8 019079 796 1056T:ref3gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
2456038828 8 026756 820 1088T:ref3gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
5695047343 8 023212 820 1088T:ref2gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
5920226271 8 021555 812 1088T:ref2gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
5952396398 8 020683 852 1024T:ref2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
6089365570 8 019631 796 1056T:ref2gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
8025935573 8 020629 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: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:354: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: 3 errors generated.

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 'pi32_init':
pi-cipher.c: pi-cipher.c:842:5: warning: 'pi' accessing 64 bytes in a region of size 16 [-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 '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