Implementation notes: amd64, speed2supercop, crypto_dh/gls1271

Computer: speed2supercop
Microarchitecture: amd64; Haswell+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-1fc9cbf5
SUPERCOP version: 20240625
Operation: crypto_dh
Primitive: gls1271
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
62940479002 0 80101117 760 1728T:ref4gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070420240625
63431261728 0 8081857 760 1728T:ref4gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070420240625
66107256955 0 8076661 760 1728T:ref4gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070420240625
70901642863 0 8061669 752 1696T:ref4gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070420240625

Compiler output


gls1271.c: gls1271.c:386:2: error: call to undeclared function 'ecn2_brick_init'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
gls1271.c:         ecn2_brick_init(&binst,prom,A,B,p,6,128);
gls1271.c:         ^
gls1271.c: gls1271.c:386:2: note: did you mean 'ebrick_init'?
gls1271.c: ./miracl.h:1203:13: note: 'ebrick_init' declared here
gls1271.c: extern void ebrick_init(ebrick *,const mr_small *,big,big,big,int,int);
gls1271.c:             ^
gls1271.c: gls1271.c:352:9: warning: unused variable 'i' [-Wunused-variable]
gls1271.c:     int i,promptr;
gls1271.c:         ^
gls1271.c: gls1271.c:416:9: warning: unused variable 'i' [-Wunused-variable]
gls1271.c:     int i,promptr;
gls1271.c:         ^
gls1271.c: gls1271.c:419:12: warning: unused variable 'y' [-Wunused-variable]
gls1271.c:     zzn2 x,y,psi[2];
gls1271.c:            ^
gls1271.c: 3 warnings and 1 error generated.

Number of similar (implementation,compiler) pairs: 5, namely:
ImplementationCompiler
T:ref4clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:ref4clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:ref4clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:ref4clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:ref4clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))

Compiler output


gls1271.c: gls1271.c: In function 'crypto_dh_gls1271_ref4_timingleaks_keypair':
gls1271.c: gls1271.c:386:9: warning: implicit declaration of function 'ecn2_brick_init'; did you mean 'ebrick_init'? [-Wimplicit-function-declaration]
gls1271.c:   386 |         ecn2_brick_init(&binst,prom,A,B,p,6,128);
gls1271.c:       |         ^~~~~~~~~~~~~~~
gls1271.c:       |         ebrick_init
gls1271.c: gls1271.c:352:9: warning: unused variable 'i' [-Wunused-variable]
gls1271.c:   352 |     int i,promptr;
gls1271.c:       |         ^
gls1271.c: gls1271.c: In function 'crypto_dh_gls1271_ref4_timingleaks':
gls1271.c: gls1271.c:419:12: warning: unused variable 'y' [-Wunused-variable]
gls1271.c:   419 |     zzn2 x,y,psi[2];
gls1271.c:       |            ^
gls1271.c: gls1271.c:416:9: warning: unused variable 'i' [-Wunused-variable]
gls1271.c:   416 |     int i,promptr;
gls1271.c:       |         ^
mrarth1.c: mrarth1.c: In function 'mr_pmul':
mrarth1.c: mrarth1.c:97:25: warning: variable 'zg' set but not used [-Wunused-but-set-variable]
mrarth1.c:    97 |     mr_small carry,*xg,*zg;
mrarth1.c:       |                         ^~
mrarth1.c: mrarth1.c:97:21: warning: variable 'xg' set but not used [-Wunused-but-set-variable]
mrarth1.c:    97 |     mr_small carry,*xg,*zg;
mrarth1.c:       |                     ^~
mrarth1.c: mrarth1.c: In function 'mr_sdiv':
mrarth1.c: mrarth1.c:378:22: warning: variable 'zg' set but not used [-Wunused-but-set-variable]
mrarth1.c:   378 |     mr_small sr,*xg,*zg;
mrarth1.c:       |                      ^~
mrarth1.c: mrarth1.c:378:18: warning: variable 'xg' set but not used [-Wunused-but-set-variable]
mrarth1.c:   378 |     mr_small sr,*xg,*zg;
mrarth1.c:       |                  ^~
mrarth1.c: mrarth1.c: In function 'bytes_to_big':
mrarth1.c: mrarth1.c:747:19: warning: unused variable 'ch' [-Wunused-variable]
mrarth1.c:   747 |     unsigned char ch;
mrarth1.c:       |                   ^~
mrarth1.c: mrarth1.c:746:18: warning: unused variable 'dig' [-Wunused-variable]
mrarth1.c:   746 |     unsigned int dig;
mrarth1.c:       |                  ^~~
mrarth1.c: mrarth1.c: In function 'big_to_bytes':
mrarth1.c: mrarth1.c:834:19: warning: unused variable 'ch' [-Wunused-variable]
mrarth1.c:   834 |     unsigned char ch;
mrarth1.c:       |                   ^~
mrarth1.c: ...
mrarth2.c: mrarth2.c: In function 'multiply':
mrarth2.c: mrarth2.c:65:29: warning: variable 'w0g' set but not used [-Wunused-but-set-variable]
mrarth2.c:    65 |     mr_small carry,*xg,*yg,*w0g;
mrarth2.c:       |                             ^~~
mrarth2.c: mrarth2.c:65:25: warning: variable 'yg' set but not used [-Wunused-but-set-variable]
mrarth2.c:    65 |     mr_small carry,*xg,*yg,*w0g;
mrarth2.c:       |                         ^~
mrarth2.c: mrarth2.c:65:21: warning: variable 'xg' set but not used [-Wunused-but-set-variable]
mrarth2.c:    65 |     mr_small carry,*xg,*yg,*w0g;
mrarth2.c:       |                     ^~
mrarth2.c: mrarth2.c: In function 'divide':
mrarth2.c: mrarth2.c:834:31: warning: variable 'yg' set but not used [-Wunused-but-set-variable]
mrarth2.c:   834 |     mr_small borrow,dig,*w0g,*yg;
mrarth2.c:       |                               ^~
mrarth2.c: mrarth2.c:834:26: warning: variable 'w0g' set but not used [-Wunused-but-set-variable]
mrarth2.c:   834 |     mr_small borrow,dig,*w0g,*yg;
mrarth2.c:       |                          ^~~
mrcore.c: mrcore.c: In function 'mirexit':
mrcore.c: mrcore.c:1376:9: warning: unused variable 'i' [-Wunused-variable]
mrcore.c:  1376 |     int i;
mrcore.c:       |         ^
mrecn2.c: mrecn2.c: In function 'nres_sqroot':
mrecn2.c: mrecn2.c:222:13: warning: unused variable 'js' [-Wunused-variable]
mrecn2.c:   222 |     int i,t,js;
mrecn2.c:       |             ^~
mrecn2.c: mrecn2.c:222:11: warning: unused variable 't' [-Wunused-variable]
mrecn2.c:   222 |     int i,t,js;
mrecn2.c:       |           ^
mrecn2.c: mrecn2.c: In function 'ecn2_sub':
mrecn2.c: mrecn2.c:846:10: warning: variable 'lam' set but not used [-Wunused-but-set-variable]
mrecn2.c:   846 |     zzn2 lam;
mrecn2.c:       |          ^~~
mrecn2.c: mrecn2.c: In function 'ecn2_precomp_gls':
mrecn2.c: mrecn2.c:1231:11: warning: variable 'j' set but not used [-Wunused-but-set-variable]
mrecn2.c:  1231 |     int i,j;
mrecn2.c:       |           ^
mrmonty.c: mrmonty.c: In function 'redc':
mrmonty.c: mrmonty.c:264:46: warning: variable 'mg' set but not used [-Wunused-but-set-variable]
mrmonty.c:   264 |     mr_small carry,delay_carry,m,ndash,*w0g,*mg;
mrmonty.c:       |                                              ^~
mrmonty.c: mrmonty.c:264:41: warning: variable 'w0g' set but not used [-Wunused-but-set-variable]
mrmonty.c:   264 |     mr_small carry,delay_carry,m,ndash,*w0g,*mg;
mrmonty.c:       |                                         ^~~

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