Implementation notes: x86, thoth, crypto_scalarmult/curve25519

Computer: thoth
Architecture: x86
CPU ID: AuthenticAMD-00000622-0183f9ff
SUPERCOP version: 20160806
Operation: crypto_scalarmult
Primitive: curve25519
TimeImplementationCompilerBenchmark dateSUPERCOP version
2406867athlongcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv2016072720160724
2406894athlongcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv2016072720160724
2407179athlonclang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments2016072720160724
2408451athlongcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv2016072720160724
2461320athlongcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv2016072720160724
5731533ref10clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments2016072720160724
6078577ref10gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv2016072720160724
6080152ref10gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv2016072720160724
6317844ref10gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv2016072720160724
11985552ref10gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv2016072720160724
68522004refgcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv2016072720160724
68952915refgcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv2016072720160724
69499705refgcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv2016072720160724
69834597refclang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments2016072720160724
71866305refgcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv2016072720160724

Compiler output

Implementation: crypto_scalarmult/curve25519/athlon
Compiler: clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments
smult.c: smult.c:20:11: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_square' is invalid in C99 [-Wimplicit-function-declaration]
smult.c: /* 2 */ square(z2,z);
smult.c: ^
smult.c: smult.c:4:16: note: expanded from macro 'square'
smult.c: #define square crypto_scalarmult_curve25519_athlon_square
smult.c: ^
smult.c: smult.c:23:11: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_mult' is invalid in C99 [-Wimplicit-function-declaration]
smult.c: /* 9 */ mult(z9,t0,z);
smult.c: ^
smult.c: smult.c:3:14: note: expanded from macro 'mult'
smult.c: #define mult crypto_scalarmult_curve25519_athlon_mult
smult.c: ^
smult.c: smult.c:84:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_init' is invalid in C99 [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_init();
smult.c: ^
smult.c: smult.c:85:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_todouble' is invalid in C99 [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_todouble(work,p);
smult.c: ^
smult.c: smult.c:86:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_mainloop' is invalid in C99 [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_mainloop(work,e);
smult.c: ^
smult.c: smult.c:89:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_fromdouble' is invalid in C99 [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_fromdouble(q,work + 20);
smult.c: ^
smult.c: 6 warnings generated.

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments athlon

Compiler output

Implementation: crypto_scalarmult/curve25519/donna_c64
Compiler: clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments
try.c: crypto_scalarmult_curve25519.a(smult.o): In function `crypto_scalarmult_curve25519_donna_c64':
try.c: smult.c:(.text+0x...): undefined reference to `__multi3'
try.c: smult.c:(.text+0x...): undefined reference to `__multi3'
try.c: smult.c:(.text+0x...): undefined reference to `__multi3'
try.c: smult.c:(.text+0x...): undefined reference to `__multi3'
try.c: smult.c:(.text+0x...): undefined reference to `__multi3'
try.c: crypto_scalarmult_curve25519.a(smult.o):smult.c:(.text+0x...): more undefined references to `__multi3' follow
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments donna_c64

Compiler output

Implementation: crypto_scalarmult/curve25519/athlon
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv
smult.c: smult.c: In function 'crypto_scalarmult_curve25519_athlon_recip':
smult.c: smult.c:4:16: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_square' [-Wimplicit-function-declaration]
smult.c: #define square crypto_scalarmult_curve25519_athlon_square
smult.c: ^
smult.c: smult.c:20:11: note: in expansion of macro 'square'
smult.c: /* 2 */ square(z2,z);
smult.c: ^
smult.c: smult.c:3:14: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_mult' [-Wimplicit-function-declaration]
smult.c: #define mult crypto_scalarmult_curve25519_athlon_mult
smult.c: ^
smult.c: smult.c:23:11: note: in expansion of macro 'mult'
smult.c: /* 9 */ mult(z9,t0,z);
smult.c: ^
smult.c: smult.c: In function 'crypto_scalarmult_curve25519_athlon':
smult.c: smult.c:84:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_init' [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_init();
smult.c: ^
smult.c: smult.c:85:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_todouble' [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_todouble(work,p);
smult.c: ^
smult.c: smult.c:86:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_mainloop' [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_mainloop(work,e);
smult.c: ^
smult.c: smult.c:89:3: warning: implicit declaration of function 'crypto_scalarmult_curve25519_athlon_fromdouble' [-Wimplicit-function-declaration]
smult.c: crypto_scalarmult_curve25519_athlon_fromdouble(q,work + 20);
smult.c: ...

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

Compiler output

Implementation: crypto_scalarmult/curve25519/donna_c64
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv
smult.c: smult.c:34:1: error: unable to emulate 'TI'
smult.c: typedef unsigned uint128_t __attribute__((mode(TI)));
smult.c: ^
smult.c: smult.c: In function 'fscalar_product':
smult.c: smult.c:76:49: warning: right shift count >gt;= width of type [-Wshift-count-overflow]
smult.c: a = ((uint128_t) in[1]) * scalar + ((limb) (a >gt;>gt; 51));
smult.c: ^
smult.c: smult.c:79:49: warning: right shift count >gt;= width of type [-Wshift-count-overflow]
smult.c: a = ((uint128_t) in[2]) * scalar + ((limb) (a >gt;>gt; 51));
smult.c: ^
smult.c: smult.c:82:49: warning: right shift count >gt;= width of type [-Wshift-count-overflow]
smult.c: a = ((uint128_t) in[3]) * scalar + ((limb) (a >gt;>gt; 51));
smult.c: ^
smult.c: smult.c:85:49: warning: right shift count >gt;= width of type [-Wshift-count-overflow]
smult.c: a = ((uint128_t) in[4]) * scalar + ((limb) (a >gt;>gt; 51));
smult.c: ^
smult.c: smult.c:88:19: warning: right shift count >gt;= width of type [-Wshift-count-overflow]
smult.c: output[0] += (a >gt;>gt; 51) * 19;
smult.c: ^
smult.c: smult.c: In function 'fmul':
smult.c: smult.c:132:70: warning: right shift count >gt;= width of type [-Wshift-count-overflow]
smult.c: r0 = (limb)t[0] & 0x7ffffffffffff; c = (limb)(t[0] >gt;>gt; 51);
smult.c: ^
smult.c: smult.c:133:70: warning: right shift count >gt;= width of type [-Wshift-count-overflow]
smult.c: t[1] += c; r1 = (limb)t[1] & 0x7ffffffffffff; c = (limb)(t[1] >gt;>gt; 51);
smult.c: ...

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