Implementation notes: amd64, wooden, crypto_dh/gls254

Computer: wooden
Microarchitecture: amd64; Goldmont (506c9)
Architecture: amd64
CPU ID: GenuineIntel-000506c9-1fc9cbf5
SUPERCOP version: 20240107
Operation: crypto_dh
Primitive: gls254
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
287166135008 16 0155484 824 1568T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
292308131136 16 0149356 824 1568T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
309966115417 16 0131858 816 1568T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
31218828539 98336 048172 99112 1632T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
32549213310 98336 030956 99112 1632T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
32710414731 98336 033220 99112 1632T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
327540110638 16 0127802 816 1568T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
33230212107 98336 028564 99104 1600T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
35869651302 196608 072161 197408 1568T:optclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
35984421952 196608 039981 197376 1632T:optgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
36099651302 196608 069841 197408 1568T:optclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
36188223848 196608 043061 197376 1632T:optgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
36583623489 196608 040239 197400 1568T:optclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
366762158208 0 0178465 792 1568T:protclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
367200155136 0 0173089 792 1568T:protclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
38360016617 196608 032949 197368 1600T:optgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
38750419694 196608 036951 197400 1568T:optclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
394582123452 0 0139615 784 1568T:protclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
40151038219 98304 057861 99072 1632T:protgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
40246020194 196608 037677 197376 1632T:optgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
41932014539 98304 032125 99072 1632T:protgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
42060216624 98304 035053 99072 1632T:protgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215
423560112751 0 0129895 784 1568T:protclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023122220231215
42472012953 98304 029373 99064 1600T:protgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023122220231215

Compiler output

Implementation: T:opt
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
dh.c: In file included from dh.c:10:
dh.c: ./ffa.h:94:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: low_kts_stp(op00,op10,k00,k02,op01,op11,r00,r01,r02,0x00); /* a0xb0 */
dh.c: ^
dh.c: ./ffa.h:62:11: note: expanded from macro 'low_kts_stp'
dh.c: re0 = _mm_clmulepi64_si128(op0, op1, ord);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/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:10:
dh.c: ./ffa.h:94:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./ffa.h:63:11: note: expanded from macro 'low_kts_stp'
dh.c: re1 = _mm_clmulepi64_si128(op2, op3, ord);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/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:10:
dh.c: ./ffa.h:94:5: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./ffa.h:64:11: note: expanded from macro 'low_kts_stp'
dh.c: re2 = _mm_clmulepi64_si128(op4, op5, ord);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c: ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt

Compiler output

Implementation: T:prot
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
dh.c: In file included from dh.c:9:
dh.c: ./scmul.incl:273:17: warning: implicit declaration of function 'types_cond_copy2' is invalid in C99 [-Wimplicit-function-declaration]
dh.c: types_cond_copy2(tab0, tab4, tabx, n1, n2);
dh.c: ^
dh.c: ./scmul.incl:284:9: warning: implicit declaration of function 'types_cond_copy' is invalid in C99 [-Wimplicit-function-declaration]
dh.c: types_cond_copy(QX, tab0, o1);
dh.c: ^
dh.c: 2 warnings generated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:prot
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:prot
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:prot
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:prot

Compiler output

Implementation: T:prot
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
dh.c: In file included from dh.c:7:
dh.c: ./low.incl:26:2: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: MUL4(m1, m0, ma, mb);
dh.c: ^
dh.c: ./gls254.h:155:7: note: expanded from macro 'MUL4'
dh.c: r0 = _mm_clmulepi64_si128(ma, mb, 0x00);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/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:7:
dh.c: ./low.incl:26:2: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./gls254.h:156:7: note: expanded from macro 'MUL4'
dh.c: r1 = _mm_clmulepi64_si128(ma, mb, 0x11);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/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:7:
dh.c: ./low.incl:26:2: error: '__builtin_ia32_pclmulqdq128' needs target feature pclmul
dh.c: ./gls254.h:157:7: note: expanded from macro 'MUL4'
dh.c: t0 = _mm_clmulepi64_si128(t0, t0, 0x10);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_pclmul.h:45:13: note: expanded from macro '_mm_clmulepi64_si128'
dh.c: ((__m128i)__builtin_ia32_pclmulqdq128((__v2di)(__m128i)(X), \
dh.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:prot

Compiler output

Implementation: T:prot
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
dh.c: In file included from dh.c:9:
dh.c: scmul.incl: In function 'scmul_rand_wreg':
dh.c: scmul.incl:273:17: warning: implicit declaration of function 'types_cond_copy2'; did you mean 'types_copy'? [-Wimplicit-function-declaration]
dh.c: 273 | types_cond_copy2(tab0, tab4, tabx, n1, n2);
dh.c: | ^~~~~~~~~~~~~~~~
dh.c: | types_copy
dh.c: scmul.incl:284:9: warning: implicit declaration of function 'types_cond_copy'; did you mean 'types_copy'? [-Wimplicit-function-declaration]
dh.c: 284 | types_cond_copy(QX, tab0, o1);
dh.c: | ^~~~~~~~~~~~~~~
dh.c: | types_copy

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:prot
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:prot
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:prot
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:prot

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
dh.c: In file included from dh.c:9:
dh.c: ./scmul.incl:204:14: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
dh.c: if (num[0] & 0x1 == 1) {
dh.c: ^~~~~~~~~~
dh.c: ./scmul.incl:204:14: note: place parentheses around the '==' expression to silence this warning
dh.c: if (num[0] & 0x1 == 1) {
dh.c: ^
dh.c: ( )
dh.c: ./scmul.incl:204:14: note: place parentheses around the & expression to evaluate it first
dh.c: if (num[0] & 0x1 == 1) {
dh.c: ^
dh.c: ( )
dh.c: 1 warning generated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
dh.c: In file included from dh.c:6:
dh.c: ./curves.incl:53:2: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
dh.c: STEP(k, t, tmp, 16*1, 0x01);
dh.c: ^
dh.c: ./gls254.h:272:6: note: expanded from macro 'STEP'
dh.c: t = _mm_aeskeygenassist_si128(k, rcon);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
dh.c: (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
dh.c: ^
dh.c: In file included from dh.c:6:
dh.c: ./curves.incl:54:2: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
dh.c: STEP(k, t, tmp, 16*2, 0x02);
dh.c: ^
dh.c: ./gls254.h:272:6: note: expanded from macro 'STEP'
dh.c: t = _mm_aeskeygenassist_si128(k, rcon);\
dh.c: ^
dh.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
dh.c: (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
dh.c: ^
dh.c: In file included from dh.c:6:
dh.c: ./curves.incl:55:2: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
dh.c: STEP(k, t, tmp, 16*3, 0x04);
dh.c: ^
dh.c: ./gls254.h:272:6: note: expanded from macro 'STEP'
dh.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref