Implementation notes: amd64, kizomba, crypto_stream/simon128256ctr

Computer: kizomba
Microarchitecture: amd64; Kaby Lake (906e9)
Architecture: amd64
CPU ID: GenuineIntel-000906e9-1fc9cbf5
SUPERCOP version: 20240625
Operation: crypto_stream
Primitive: simon128256ctr
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
5435129712 0 0145476 816 808T:avx2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
5471130464 0 0146524 816 856T:avx2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
5855142941 0 0158814 776 864T:avx2gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
8316130021 0 0142894 808 856T:avx2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
8818127414 0 0143548 816 856T:sse4clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
8821126774 0 0142612 816 808T:sse4clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9034137821 0 0153678 776 864T:sse4gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9150158225 0 0170228 816 792T:avx2clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
12841135504 0 0147545 752 832T:sse4gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
13234138201 0 0151397 768 864T:sse4gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
14018136783 0 0150422 776 864T:sse4gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
14121126269 0 0139270 808 856T:sse4clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
15294133244 0 0145308 816 792T:sse4clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625

Compiler output


stream.c: stream.c:128: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:128: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:128: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 (Ubuntu_Clang_14.0.0)

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:145: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:145: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:154: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:154: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:294: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o):.../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:294: 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 -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:145: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:145: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:154: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:154: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:294: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o):.../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:294: 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 (11.4.0)

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:145: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:145: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:154: undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:154: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:294: undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon128256ctr.a(stream.o):.../supercop-data/kizomba/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon128256ctr/avx2/work/stream.c:294: 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 -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


stream.c: stream.c:307: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: ./Simon128256SSE4.h:67:19: note: expanded from macro 'EKBS'
stream.c: #define EKBS(rk) (RKBS(rk,4,_D),  RKBS(rk,5,_D),  RKBS(rk,6,_C),  RKBS(rk,7,_D),  RKBS(rk,8,_C),   RKBS(rk,9,_C),  RKBS(rk,10,_C), RKBS(rk,11,_D), \
stream.c:                   ^
stream.c: ./Simon128256SSE4.h:57:52: note: expanded from macro 'RKBS'
stream.c: #define RKBS(rk,r,_V) (rk[r][7]= _D ^ rk[r-4][7] ^ ROR8(rk[r-1][2])  ^ rk[r-3][7] ^ ROR8(rk[r-1][3])  ^ ROR8(rk[r-3][0]), \
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:307: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: ./Simon128256SSE4.h:67:19: note: expanded from macro 'EKBS'
stream.c: #define EKBS(rk) (RKBS(rk,4,_D),  RKBS(rk,5,_D),  RKBS(rk,6,_C),  RKBS(rk,7,_D),  RKBS(rk,8,_C),   RKBS(rk,9,_C),  RKBS(rk,10,_C), RKBS(rk,11,_D), \
stream.c:                   ^
stream.c: ./Simon128256SSE4.h:57:85: note: expanded from macro 'RKBS'
stream.c: #define RKBS(rk,r,_V) (rk[r][7]= _D ^ rk[r-4][7] ^ ROR8(rk[r-1][2])  ^ rk[r-3][7] ^ ROR8(rk[r-1][3])  ^ ROR8(rk[r-3][0]), \
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 (Ubuntu_Clang_14.0.0)

Compiler output


stream.c: stream.c:325:58: warning: argument 1 of type '__m128i[8]' with mismatched bound [-Warray-parameter=]
stream.c:   325 | inline __attribute__((always_inline)) int Transpose(u128 T[8])
stream.c: stream.c:29:58: note: previously declared as '__m128i[]'
stream.c:    29 | inline __attribute__((always_inline)) int Transpose(u128 M[]);

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:sse4gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:sse4gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:sse4gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:sse4gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)