Implementation notes: riscv64, riscvunleashed000, crypto_kem/ntskem1380

Computer: riscvunleashed000
Microarchitecture: riscv64; U54 (sifive,u54-mc)
Architecture: riscv64
CPU ID: unknown CPU ID
SUPERCOP version: 20240107
Operation: crypto_kem
Primitive: ntskem1380
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
814905683189 84 1697767 904 1560T:optclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
827035883189 84 1697767 904 1560T:optclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
831110271427 84 1685609 904 1560T:optclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
849230871427 84 1685609 904 1560T:optclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
880911859422 84 1672036 904 1560T:optgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
881192876464 84 1690796 904 1560T:optgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
889603061907 84 1674481 896 1553T:optclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
890499066572 84 1679212 904 1560T:optgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
904771857260 84 1669177 888 1560T:optgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
5611714426600 76 1640740 896 1560T:refgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
5924090819488 76 1631966 896 1560T:refgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
6373449017034 76 1628929 880 1560T:refgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
6469988418544 76 1630982 896 1560T:refgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024020120231222
24134552424551 76 1638529 892 1560T:refclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
24164669824551 76 1638529 892 1560T:refclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
24173623826529 76 1640851 892 1560T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
24183509626529 76 1640851 892 1560T:refclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222
24587193218281 76 1630697 884 1553T:refclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024020120231222

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
bitslice_bma_128.c: In file included from bitslice_bma_128.c:17:
bitslice_bma_128.c: In file included from ./bitslice_bma_128.h:18:
bitslice_bma_128.c: In file included from /usr/lib/llvm-10/lib/clang/10.0.0/include/immintrin.h:14:
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:50:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:129:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:159:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:189:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:216:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:239:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:260:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:287:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: ...

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

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
bitslice_bma_128.c: In file included from bitslice_bma_128.c:17:
bitslice_bma_128.c: bitslice_bma_128.h:18:10: fatal error: immintrin.h: No such file or directory
bitslice_bma_128.c: 18 | #include <immintrin.h>
bitslice_bma_128.c: | ^~~~~~~~~~~~~
bitslice_bma_128.c: compilation terminated.

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

Compiler output

Implementation: T:sse2
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
bitslice_bma_128.c: In file included from bitslice_bma_128.c:17:
bitslice_bma_128.c: ./bits.h:47:9: error: unknown type name '__m128i'
bitslice_bma_128.c: typedef __m128i vector;
bitslice_bma_128.c: ^
bitslice_bma_128.c: ./bits.h:98:11: error: unknown type name '__m128i'
bitslice_bma_128.c: const __m128i a_hi = _mm_unpackhi_epi64(a, a);
bitslice_bma_128.c: ^
bitslice_bma_128.c: ./bits.h:98:26: warning: implicit declaration of function '_mm_unpackhi_epi64' is invalid in C99 [-Wimplicit-function-declaration]
bitslice_bma_128.c: const __m128i a_hi = _mm_unpackhi_epi64(a, a);
bitslice_bma_128.c: ^
bitslice_bma_128.c: ./bits.h:99:21: warning: implicit declaration of function '_mm_cvtsi128_si64' is invalid in C99 [-Wimplicit-function-declaration]
bitslice_bma_128.c: return popcount(_mm_cvtsi128_si64(a_hi)) + popcount(_mm_cvtsi128_si64(a));
bitslice_bma_128.c: ^
bitslice_bma_128.c: In file included from bitslice_bma_128.c:18:
bitslice_bma_128.c: In file included from ./bitslice_bma_128.h:18:
bitslice_bma_128.c: In file included from /usr/lib/llvm-10/lib/clang/10.0.0/include/immintrin.h:14:
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:50:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:129:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/mmintrin.h:159:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
bitslice_bma_128.c: return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
bitslice_bma_128.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: ...

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

Compiler output

Implementation: T:sse2
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
bitslice_bma_128.c: In file included from bitslice_bma_128.c:17:
bitslice_bma_128.c: bits.h:47:9: error: unknown type name '__m128i'
bitslice_bma_128.c: 47 | typedef __m128i vector;
bitslice_bma_128.c: | ^~~~~~~
bitslice_bma_128.c: bits.h: In function 'vector_popcount':
bitslice_bma_128.c: bits.h:98:11: error: unknown type name '__m128i'
bitslice_bma_128.c: 98 | const __m128i a_hi = _mm_unpackhi_epi64(a, a);
bitslice_bma_128.c: | ^~~~~~~
bitslice_bma_128.c: bits.h:98:26: warning: implicit declaration of function '_mm_unpackhi_epi64' [-Wimplicit-function-declaration]
bitslice_bma_128.c: 98 | const __m128i a_hi = _mm_unpackhi_epi64(a, a);
bitslice_bma_128.c: | ^~~~~~~~~~~~~~~~~~
bitslice_bma_128.c: bits.h:99:21: warning: implicit declaration of function '_mm_cvtsi128_si64' [-Wimplicit-function-declaration]
bitslice_bma_128.c: 99 | return popcount(_mm_cvtsi128_si64(a_hi)) + popcount(_mm_cvtsi128_si64(a));
bitslice_bma_128.c: | ^~~~~~~~~~~~~~~~~
bitslice_bma_128.c: bits.h:93:42: note: in definition of macro 'popcount'
bitslice_bma_128.c: 93 | #define popcount(x) __builtin_popcountll(x)
bitslice_bma_128.c: | ^
bitslice_bma_128.c: In file included from bitslice_bma_128.c:18:
bitslice_bma_128.c: bitslice_bma_128.h: At top level:
bitslice_bma_128.c: bitslice_bma_128.h:18:10: fatal error: immintrin.h: No such file or directory
bitslice_bma_128.c: 18 | #include <immintrin.h>
bitslice_bma_128.c: | ^~~~~~~~~~~~~
bitslice_bma_128.c: compilation terminated.

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