Implementation notes: riscv64, riscvunleashed000, crypto_stream/chacha20

Computer: riscvunleashed000
Microarchitecture: riscv64; U54 (sifive,u54-mc)
Architecture: riscv64
CPU ID: unknown CPU ID
SUPERCOP version: 20240107
Operation: crypto_stream
Primitive: chacha20
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
503404812 0 414762 776 792e/regsgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
544343234 0 113269 776 793e/mergedclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
544343234 0 113269 776 793e/mergedclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
544343234 0 113693 776 793e/mergedclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
544433234 0 113693 776 793e/mergedclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
544433234 0 111603 768 789e/mergedclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
555173130 0 410684 760 792e/mergedgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
566172226 0 410526 776 792e/regsgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
590053964 0 413922 776 792e/refgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
595893586 0 411695 768 792e/mergedgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
603954702 0 414662 776 792e/mergedgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
603964072 0 412382 776 792e/mergedgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
6053612827 2240 01427989 146784 13736T:cryptoppg++_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
6054112524 2240 01427551 146784 13736T:cryptoppg++_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
605956662 2880 01422872 147416 13736T:cryptoppg++_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
6081312945 2240 01429709 146776 13736T:cryptoppg++_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
622636958 0 115339 768 789dolbeau/generic-gccsimd128clang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
623557236 0 117287 776 793dolbeau/generic-gccsimd128clang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
623567236 0 117287 776 793dolbeau/generic-gccsimd128clang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
623597360 0 117835 776 793dolbeau/generic-gccsimd128clang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
623687360 0 117835 776 793dolbeau/generic-gccsimd128clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
680932082 0 49630 760 792e/regsgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
681922796 0 410905 768 792e/regsgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
690332598 0 113045 776 793e/refclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
690332598 0 113045 776 793e/refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
708412612 0 113059 776 793e/regsclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
708422612 0 112635 776 793e/regsclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
708422612 0 113059 776 793e/regsclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
708422612 0 112635 776 793e/regsclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
708472612 0 110969 768 789e/regsclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
712452424 0 112447 776 793e/refclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
712492424 0 112447 776 793e/refclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
721452194 0 410488 776 792e/refgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
7650114096 0 124147 776 793dolbeau/generic-gccsimd256clang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
7650214096 0 124147 776 793dolbeau/generic-gccsimd256clang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
7665814282 0 124757 776 793dolbeau/generic-gccsimd256clang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
7666214282 0 124757 776 793dolbeau/generic-gccsimd256clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
7683113872 0 122253 768 789dolbeau/generic-gccsimd256clang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
804772182 0 110531 768 789e/refclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011320231222
833202188 0 49732 760 792e/refgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
852222408 0 410517 768 792e/refgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
906489046 0 416620 760 792dolbeau/generic-gccsimd128gcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
940389296 0 417429 768 792dolbeau/generic-gccsimd128gcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
13295011068 0 419398 776 792dolbeau/generic-gccsimd128gcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
13319312992 0 422976 776 792dolbeau/generic-gccsimd128gcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
15236724006 0 432336 776 792dolbeau/generic-gccsimd256gcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
15258225810 0 435794 776 792dolbeau/generic-gccsimd256gcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
16073723176 0 431309 768 792dolbeau/generic-gccsimd256gcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222
56226624154 0 430936 760 792dolbeau/generic-gccsimd256gcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011320231222

Compiler output

Implementation: krovetz/vec128
Security model: constbranchindex
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
stream.c: stream.c:80:2: error: -- Implementation supports only machines with neon, altivec or SSE2
stream.c: #error -- Implementation supports only machines with neon, altivec or SSE2
stream.c: ^
stream.c: stream.c:151:14: warning: implicit declaration of function 'NONCE' is invalid in C99 [-Wimplicit-function-declaration]
stream.c: vec s3 = NONCE(np);
stream.c: ^
stream.c: stream.c:151:9: error: initializing 'vec' (vector of 4 'unsigned int' values) with an expression of incompatible type 'int'
stream.c: vec s3 = NONCE(np);
stream.c: ^ ~~~~~~~~~
stream.c: stream.c:152:36: error: use of undeclared identifier 'VBPI'
stream.c: for (iters = 0; iters < inlen/(BPI*64); iters++) {
stream.c: ^
stream.c: stream.c:91:19: note: expanded from macro 'BPI'
stream.c: #define BPI (VBPI + GPR_TOO) /* Blocks computed per loop iteration */
stream.c: ^
stream.c: stream.c:152:36: error: use of undeclared identifier 'GPR_TOO'
stream.c: stream.c:91:26: note: expanded from macro 'BPI'
stream.c: #define BPI (VBPI + GPR_TOO) /* Blocks computed per loop iteration */
stream.c: ^
stream.c: stream.c:155:19: error: use of undeclared identifier 'ONE'
stream.c: v7 = v3 + ONE;
stream.c: ^
stream.c: stream.c:176:13: warning: implicit declaration of function 'ROTW16' is invalid in C99 [-Wimplicit-function-declaration]
stream.c: DQROUND_VECTORS(v0,v1,v2,v3)
stream.c: ^
stream.c: ...

Number of similar (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE krovetz/vec128
clang -march=rv64imafdc -mtune=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE krovetz/vec128
clang -march=rv64imafdc -mtune=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE krovetz/vec128
clang -march=rv64imafdc -mtune=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE krovetz/vec128
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE krovetz/vec128

Compiler output

Implementation: krovetz/vec128
Security model: constbranchindex
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
stream.c: stream.c:80:2: error: #error -- Implementation supports only machines with neon, altivec or SSE2
stream.c: 80 | #error -- Implementation supports only machines with neon, altivec or SSE2
stream.c: | ^~~~~
stream.c: stream.c: In function 'crypto_stream_chacha20_krovetz_vec128_constbranchindex_xor':
stream.c: stream.c:151:14: warning: implicit declaration of function 'NONCE' [-Wimplicit-function-declaration]
stream.c: 151 | vec s3 = NONCE(np);
stream.c: | ^~~~~
stream.c: stream.c:151:14: error: incompatible types when initializing type 'vec' {aka '__vector(4) unsigned int'} using type 'int'
stream.c: stream.c:91:19: error: 'VBPI' undeclared (first use in this function); did you mean 'BPI'?
stream.c: 91 | #define BPI (VBPI + GPR_TOO) /* Blocks computed per loop iteration */
stream.c: | ^~~~
stream.c: stream.c:152:36: note: in expansion of macro 'BPI'
stream.c: 152 | for (iters = 0; iters < inlen/(BPI*64); iters++) {
stream.c: | ^~~
stream.c: stream.c:91:19: note: each undeclared identifier is reported only once for each function it appears in
stream.c: 91 | #define BPI (VBPI + GPR_TOO) /* Blocks computed per loop iteration */
stream.c: | ^~~~
stream.c: stream.c:152:36: note: in expansion of macro 'BPI'
stream.c: 152 | for (iters = 0; iters < inlen/(BPI*64); iters++) {
stream.c: | ^~~
stream.c: stream.c:91:26: error: 'GPR_TOO' undeclared (first use in this function)
stream.c: 91 | #define BPI (VBPI + GPR_TOO) /* Blocks computed per loop iteration */
stream.c: | ^~~~~~~
stream.c: stream.c:152:36: note: in expansion of macro 'BPI'
stream.c: 152 | for (iters = 0; iters < inlen/(BPI*64); iters++) {
stream.c: ...

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE krovetz/vec128
gcc -mcpu=sifive-u54 -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE krovetz/vec128
gcc -mcpu=sifive-u54 -O -fomit-frame-pointer -fwrapv -fPIC -fPIE krovetz/vec128
gcc -mcpu=sifive-u54 -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE krovetz/vec128