Implementation notes: amd64, hydra5, crypto_stream/simon128256ctr

Computer: hydra5
Microarchitecture: amd64; K10 32nm (300f10)
Architecture: amd64
CPU ID: AuthenticAMD-00300f10-178bfbff
SUPERCOP version: 20240625
Operation: crypto_stream
Primitive: simon128256ctr

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: 5, namely:
ImplementationCompiler
T:avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


stream.c: In file included from Simon128256AVX2.h:17,
stream.c:                  from stream.c:20:
stream.c: stream.c: In function 'Encrypt':
stream.c: Intrinsics_AVX2_128block.h:25:21: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
stream.c:    25 | #define SET1(X,c) (X=SET(c,c,c,c))
stream.c:       |                   ~~^~~~~~~~~~~~~~
stream.c: stream.c:128:3: note: in expansion of macro 'SET1'
stream.c:   128 |   SET1(X[0],nonce[1]); SET4(Y[0],nonce[0]);
stream.c:       |   ^~~~
stream.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
stream.c:                  from Intrinsics_AVX2_128block.h:5,
stream.c:                  from Simon128256AVX2.h:17,
stream.c:                  from stream.c:20:
stream.c: stream.c: In function 'Transpose':
stream.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:913:1: error: inlining failed in call to 'always_inline' '_mm256_xor_si256': target specific option mismatch
stream.c:   913 | _mm256_xor_si256 (__m256i __A, __m256i __B)
stream.c:       | ^~~~~~~~~~~~~~~~
stream.c: In file included from Simon128256AVX2.h:17,
stream.c:                  from stream.c:20:
stream.c: Intrinsics_AVX2_128block.h:15:13: note: called from here
stream.c:    15 | #define XOR _mm256_xor_si256
stream.c: stream.c:412:10: note: in expansion of macro 'XOR'
stream.c:   412 |   T[6] = XOR(T[6], SL(W[3],1));
stream.c:       |          ^~~
stream.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
stream.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
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: 5, namely:
ImplementationCompiler
T:sse4clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:sse4clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:sse4clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:sse4clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
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[]);
stream.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/smmintrin.h:32,
stream.c:                  from Intrinsics_SSE4_128block.h:5,
stream.c:                  from Simon128256SSE4.h:17,
stream.c:                  from stream.c:20:
stream.c: stream.c: In function 'Encrypt':
stream.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/tmmintrin.h:136:1: error: inlining failed in call to 'always_inline' '_mm_shuffle_epi8': target specific option mismatch
stream.c:   136 | _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
stream.c:       | ^~~~~~~~~~~~~~~~
stream.c: In file included from Simon128256SSE4.h:17,
stream.c:                  from stream.c:20:
stream.c: Intrinsics_SSE4_128block.h:15:13: note: called from here
stream.c:    15 | #define XOR _mm_xor_si128
stream.c: Simon128256SSE4.h:24:41: note: in expansion of macro 'XOR'
stream.c:    24 | #define RD(U,V,k) (V=XOR(V,ROL(U,2)), V=XOR(V,AND(ROL(U,1),ROL8(U))), V=XOR(V,k))
stream.c:       |                                         ^~~
stream.c: Simon128256SSE4.h:26:26: note: in expansion of macro 'RD'
stream.c:    26 | #define R1x2(U,V,rk,s)  (RD(U[0],V[0],rk[s][0]))
stream.c:       |                          ^~
stream.c: Simon128256SSE4.h:32:44: note: in expansion of macro 'R1x2'
stream.c:    32 | #define R2x2(X,Y,rk,r,s)  (R1x2(X,Y,rk,r), R1x2(Y,X,rk,s))
stream.c:       |                                            ^~~~
stream.c: ...

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)