Implementation notes: amd64, margaux, crypto_dh/k277taa

Computer: margaux
Microarchitecture: amd64; Core 2 65nm (6fb)
Architecture: amd64
CPU ID: GenuineIntel-000006fb-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_dh
Primitive: k277taa

Compiler output


dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:132:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c:     FFA_RED_277_STP(a,P,m,t_00,mul);
dh.c:     ^
dh.c: ./ffa.h:110:5: note: expanded from macro 'FFA_RED_277_STP'
dh.c:     ffa_red_277_stp(A##_00,A##_01,A##_02,P##_00,P##_01,P##_02,\
dh.c:     ^
dh.c: ./ffa.h:90:12: note: expanded from macro 'ffa_red_277_stp'
dh.c:     m_00 = _mm_clmulepi64_si128(mul, P_00, 0x00);\
dh.c:            ^
dh.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c:   ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c:             ^
dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:132:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./ffa.h:110:5: note: expanded from macro 'FFA_RED_277_STP'
dh.c:     ffa_red_277_stp(A##_00,A##_01,A##_02,P##_00,P##_01,P##_02,\
dh.c:     ^
dh.c: ./ffa.h:91:12: note: expanded from macro 'ffa_red_277_stp'
dh.c:     m_01 = _mm_clmulepi64_si128(mul, P_00, 0x10);\
dh.c:            ^
dh.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c:   ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c:             ^
dh.c: In file included from dh.c:6:
dh.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:refclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:123:12: error: '__builtin_ia32_palignr128' needs target feature ssse3
dh.c:     a_01 = _mm_alignr_epi8(a_02, a_01, 8);
dh.c:            ^
dh.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/tmmintrin.h:152:13: note: expanded from macro '_mm_alignr_epi8'
dh.c:   ((__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
dh.c:             ^
dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:132:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c:     FFA_RED_277_STP(a,P,m,t_00,mul);
dh.c:     ^
dh.c: ./ffa.h:110:5: note: expanded from macro 'FFA_RED_277_STP'
dh.c:     ffa_red_277_stp(A##_00,A##_01,A##_02,P##_00,P##_01,P##_02,\
dh.c:     ^
dh.c: ./ffa.h:90:12: note: expanded from macro 'ffa_red_277_stp'
dh.c:     m_00 = _mm_clmulepi64_si128(mul, P_00, 0x00);\
dh.c:            ^
dh.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c:   ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c:             ^
dh.c: In file included from dh.c:6:
dh.c: ./ffa.h:132:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./ffa.h:110:5: note: expanded from macro 'FFA_RED_277_STP'
dh.c:     ffa_red_277_stp(A##_00,A##_01,A##_02,P##_00,P##_01,P##_02,\
dh.c:     ^
dh.c: ...

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

Compiler output


dh.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:41,
dh.c:                  from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
dh.c:                  from lib.h:2,
dh.c:                  from dh.c:2:
dh.c: ffa.h: In function 'ffa_red_277':
dh.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h:116:1: error: inlining failed in call to 'always_inline' '_mm_clmulepi64_si128': target specific option mismatch
dh.c:   116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
dh.c:       | ^~~~~~~~~~~~~~~~~~~~
dh.c: In file included from dh.c:6:
dh.c: ffa.h:94:12: note: called from here
dh.c:    94 |     m_04 = _mm_clmulepi64_si128(mul, P_02, 0x00);\
dh.c:       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dh.c: ffa.h:110:5: note: in expansion of macro 'ffa_red_277_stp'
dh.c:   110 |     ffa_red_277_stp(A##_00,A##_01,A##_02,P##_00,P##_01,P##_02,\
dh.c:       |     ^~~~~~~~~~~~~~~
dh.c: ffa.h:142:5: note: in expansion of macro 'FFA_RED_277_STP'
dh.c:   142 |     FFA_RED_277_STP(a,P,m,t_00,mul);
dh.c:       |     ^~~~~~~~~~~~~~~
dh.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:41,
dh.c:                  from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
dh.c:                  from lib.h:2,
dh.c:                  from dh.c:2:
dh.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h:116:1: error: inlining failed in call to 'always_inline' '_mm_clmulepi64_si128': target specific option mismatch
dh.c:   116 | _mm_clmulepi64_si128 (__m128i __X, __m128i __Y, const int __I)
dh.c:       | ^~~~~~~~~~~~~~~~~~~~
dh.c: ...

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