Implementation notes: amd64, cezanne, crypto_stream/simon128128ctr

Computer: cezanne
Microarchitecture: amd64; Zen 3 (a50f00)
Architecture: amd64
CPU ID: AuthenticAMD-00a50f00-178bfbff
SUPERCOP version: 20240625
Operation: crypto_stream
Primitive: simon128128ctr
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
3636115978 0 0131168 812 984T:avx2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
3661116074 0 0131136 812 984T:avx2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
4647120178 0 0135400 780 1016T:avx2gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
5145114784 0 0126958 804 952T:avx2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
5777117338 0 0130856 780 1016T:avx2gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
6227115050 0 0126947 756 984T:avx2gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
6505112510 0 0127704 780 1016T:sse4gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
6767109478 0 0124736 812 984T:sse4clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
6791109446 0 0124592 812 984T:sse4clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
8802113551 0 0125854 804 952T:sse4clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9149112031 0 0125504 780 1016T:sse4gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
10183114589 0 0126443 756 984T:sse4gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
10396123118 0 0135630 804 952T:sse4clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
10422117050 0 0130039 772 1016T:sse4gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)
try.c: /usr/bin/ld: libcrypto_stream_simon128128ctr.a(stream.o): in function `ExpandKeyBS':
try.c: .../supercop-data/cezanne/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:338: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128128ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/cezanne/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:147: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/cezanne/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:147: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/cezanne/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:156: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/cezanne/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:156: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128128ctr.a(stream.o):.../supercop-data/cezanne/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:297: more undefined references to `Transpose' follow
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)
stream.c: stream.c:130:3: error: always_inline function '_mm256_set_epi64x' requires target feature 'avx', but would be inlined into function 'Encrypt' that is compiled without support for 'avx'
stream.c:   SET1(X[0],nonce[1]); SET4(Y[0],nonce[0]);
stream.c:   ^
stream.c: ./Intrinsics_AVX2_128block.h:25:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c))
stream.c:                      ^
stream.c: ./Intrinsics_AVX2_128block.h:24:13: note: expanded from macro 'SET'
stream.c: #define SET _mm256_set_epi64x
stream.c:             ^
stream.c: stream.c:130:3: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
stream.c: ./Intrinsics_AVX2_128block.h:25:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c))
stream.c:                      ^
stream.c: ./Intrinsics_AVX2_128block.h:24:13: note: expanded from macro 'SET'
stream.c: #define SET _mm256_set_epi64x
stream.c:             ^
stream.c: stream.c:130:24: error: always_inline function '_mm256_set_epi64x' requires target feature 'avx', but would be inlined into function 'Encrypt' that is compiled without support for 'avx'
stream.c:   SET1(X[0],nonce[1]); SET4(Y[0],nonce[0]);
stream.c:                        ^
stream.c: ./Intrinsics_AVX2_128block.h:26:22: note: expanded from macro 'SET4'
stream.c: #define SET4(X,c) (X=SET(c,c,c,c), X=ADD(X,_q))
stream.c:                      ^
stream.c: ./Intrinsics_AVX2_128block.h:24:13: note: expanded from macro 'SET'
stream.c: #define SET _mm256_set_epi64x
stream.c:             ^
stream.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)
try.c: /usr/bin/ld: libcrypto_stream_simon128128ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/cezanne/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:147: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/cezanne/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:147: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/cezanne/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:156: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/cezanne/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:156: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128128ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/cezanne/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:297: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128128ctr.a(stream.o):.../supercop-data/cezanne/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128128ctr/avx2/work/stream.c:297: more undefined references to `Transpose' follow
try.c: collect2: error: ld returned 1 exit status

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)

Compiler output

Implementation: T:sse4
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)
stream.c: stream.c:306:3: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ExpandKeyBS' that is compiled without support for 'ssse3'
stream.c:   EKBS(rk);
stream.c:   ^
stream.c: ./Simon128128SSE4.h:62:19: note: expanded from macro 'EKBS'
stream.c: #define EKBS(rk) (RKBS(rk,2,_D),  RKBS(rk,3,_C),  RKBS(rk,4,_D),  RKBS(rk,5,_C),  RKBS(rk,6,_D),  RKBS(rk,7,_D),  RKBS(rk,8,_D), RKBS(rk,9,_D), \
stream.c:                   ^
stream.c: ./Simon128128SSE4.h:53:52: note: expanded from macro 'RKBS'
stream.c: #define RKBS(rk,r,_V) (rk[r][7]= _D ^ rk[r-2][7] ^ ROR8(rk[r-1][2] ^ rk[r-1][3]), \
stream.c:                                                    ^
stream.c: ./Intrinsics_SSE4_128block.h:39:19: note: expanded from macro 'ROR8'
stream.c: #define ROR8(X)  (SHFL(X,R8))
stream.c:                   ^
stream.c: ./Intrinsics_SSE4_128block.h:35:14: note: expanded from macro 'SHFL'
stream.c: #define SHFL _mm_shuffle_epi8
stream.c:              ^
stream.c: stream.c:306:3: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ExpandKeyBS' that is compiled without support for 'ssse3'
stream.c: ./Simon128128SSE4.h:62:19: note: expanded from macro 'EKBS'
stream.c: #define EKBS(rk) (RKBS(rk,2,_D),  RKBS(rk,3,_C),  RKBS(rk,4,_D),  RKBS(rk,5,_C),  RKBS(rk,6,_D),  RKBS(rk,7,_D),  RKBS(rk,8,_D), RKBS(rk,9,_D), \
stream.c:                   ^
stream.c: ./Simon128128SSE4.h:54:38: note: expanded from macro 'RKBS'
stream.c:                        rk[r][6]= _D ^ rk[r-2][6] ^ ROR8(rk[r-1][1] ^ rk[r-1][2]), \
stream.c:                                                    ^
stream.c: ./Intrinsics_SSE4_128block.h:39:19: note: expanded from macro 'ROR8'
stream.c: #define ROR8(X)  (SHFL(X,R8))
stream.c:                   ^
stream.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:sse4clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)