Implementation notes: riscv64, riscvunleashed000, crypto_hash/blake2s

Computer: riscvunleashed000
Microarchitecture: riscv64; U54 (sifive,u54-mc)
Architecture: riscv64
CPU ID: unknown CPU ID
SUPERCOP version: 20240107
Operation: crypto_hash
Primitive: blake2s
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
5552613756 0 022413 776 728T:regsclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
5552613756 0 020327 768 721T:regsclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
5552613756 0 022413 776 728T:regsclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
5552813756 0 021993 776 728T:regsclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
5553113756 0 021993 776 728T:regsclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
6597110138 0 018699 776 728T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
6598810138 0 018699 776 728T:refclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
680699312 0 017467 776 728T:refclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
683339312 0 017467 776 728T:refclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
715798190 0 014671 768 721T:refclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011220231222
7242518162 0 024924 776 728T:regsgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011220231222
11497924886 0 033421 784 728T:regsgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011220231222
11501424886 0 031801 784 728T:regsgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011220231222
15541721022 0 027385 768 728T:regsgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011220231222

Compiler output

Implementation: T:avxicc
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
blake2s.S: blake2s.S:13:15: error: unrecognized operand modifier
blake2s.S: xorl %r11d, %r11d
blake2s.S: ^
blake2s.S: blake2s.S:13:15: error: unknown operand
blake2s.S: xorl %r11d, %r11d
blake2s.S: ^
blake2s.S: blake2s.S:14:15: error: unrecognized operand modifier
blake2s.S: xorl %ecx, %ecx
blake2s.S: ^
blake2s.S: blake2s.S:14:15: error: unknown operand
blake2s.S: xorl %ecx, %ecx
blake2s.S: ^
blake2s.S: blake2s.S:15:15: error: unrecognized operand modifier
blake2s.S: movq %rsi, %r9
blake2s.S: ^
blake2s.S: blake2s.S:15:15: error: unknown operand
blake2s.S: movq %rsi, %r9
blake2s.S: ^
blake2s.S: blake2s.S:16:39: error: expected register
blake2s.S: vmovdqu .L_2il0floatpacket.10(%rip), %xmm4
blake2s.S: ^
blake2s.S: blake2s.S:17:15: error: unrecognized operand modifier
blake2s.S: xorl %eax, %eax
blake2s.S: ^
blake2s.S: blake2s.S:17:15: error: unknown operand
blake2s.S: ...

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

Compiler output

Implementation: T:avxicc
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2s.S: blake2s.c: Assembler messages:
blake2s.S: blake2s.c:13: Error: unrecognized opcode `xorl %r11d,%r11d'
blake2s.S: blake2s.c:14: Error: unrecognized opcode `xorl %ecx,%ecx'
blake2s.S: blake2s.c:15: Error: unrecognized opcode `movq %rsi,%r9'
blake2s.S: blake2s.c:16: Error: unrecognized opcode `vmovdqu .L_2il0floatpacket.10(%rip),%xmm4'
blake2s.S: blake2s.c:17: Error: unrecognized opcode `xorl %eax,%eax'
blake2s.S: blake2s.c:18: Error: unrecognized opcode `vmovdqu .L_2il0floatpacket.7(%rip),%xmm0'
blake2s.S: blake2s.c:19: Error: unrecognized opcode `vmovdqa %xmm4,%xmm2'
blake2s.S: blake2s.c:20: Error: unrecognized opcode `vmovdqu .L_2il0floatpacket.8(%rip),%xmm1'
blake2s.S: blake2s.c:21: Error: unrecognized opcode `movq %rdx,%r8'
blake2s.S: blake2s.c:22: Error: unrecognized opcode `vmovdqu .L_2il0floatpacket.9(%rip),%xmm3'
blake2s.S: blake2s.c:23: Error: unrecognized opcode `xorl %r10d,%r10d'
blake2s.S: blake2s.c:24: Error: unrecognized opcode `vmovdqu .L_2il0floatpacket.11(%rip),%xmm5'
blake2s.S: blake2s.c:25: Error: unrecognized opcode `cmpq $64,%rdx'
blake2s.S: blake2s.c:26: Error: unrecognized opcode `jbe ..B1.5'
blake2s.S: blake2s.c:28: Error: unrecognized opcode `movq %rbp,-104(%rsp)'
blake2s.S: blake2s.c:29: Error: unrecognized opcode `lea -1(%rdx),%rsi'
blake2s.S: blake2s.c:30: Error: unrecognized opcode `sarq $5,%rsi'
blake2s.S: blake2s.c:32: Error: unrecognized opcode `movq %rcx,%rbp'
blake2s.S: blake2s.c:33: Error: unrecognized opcode `shrq $58,%rsi'
blake2s.S: blake2s.c:34: Error: unrecognized opcode `movq %rax,%rcx'
blake2s.S: blake2s.c:35: Error: unrecognized opcode `lea -1(%rsi,%rdx),%rdx'
blake2s.S: blake2s.c:36: Error: unrecognized opcode `sarq $6,%rdx'
blake2s.S: blake2s.c:37: Error: unrecognized opcode `movq %rdx,%rax'
blake2s.S: blake2s.c:39: Error: unrecognized opcode `vmovdqu (%rcx,%r9),%xmm9'
blake2s.S: ...

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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2s-ref.c: In file included from blake2s-ref.c:19:
blake2s-ref.c: blake2.h:101:5: error: size of array element is not a multiple of its alignment
blake2s-ref.c: 101 | blake2s_state S[8][1];
blake2s-ref.c: | ^~~~~~~~~~~~~
blake2s-ref.c: blake2.h:102:5: error: size of array element is not a multiple of its alignment
blake2s-ref.c: 102 | blake2s_state R[1];
blake2s-ref.c: | ^~~~~~~~~~~~~
blake2s-ref.c: blake2.h:109:5: error: size of array element is not a multiple of its alignment
blake2s-ref.c: 109 | blake2b_state S[4][1];
blake2s-ref.c: | ^~~~~~~~~~~~~
blake2s-ref.c: blake2.h:110:5: error: size of array element is not a multiple of its alignment
blake2s-ref.c: 110 | blake2b_state R[1];
blake2s-ref.c: | ^~~~~~~~~~~~~
blake2s-ref.c: blake2s-ref.c: In function 'blake2s':
blake2s-ref.c: blake2s-ref.c:331:3: error: size of array element is not a multiple of its alignment
blake2s-ref.c: 331 | blake2s_state S[1];
blake2s-ref.c: | ^~~~~~~~~~~~~

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

Compiler output

Implementation: T:regs
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
blake2s.c: blake2s.c:796:11: warning: implicit conversion from 'unsigned long' to 'uint32_t' (aka 'unsigned int') changes value from 18446744073180816980 to 3766232660 [-Wconstant-conversion]
blake2s.c: v14 = ~0x1F83D9ABUL;
blake2s.c: ~ ^~~~~~~~~~~~~
blake2s.c: 1 warning generated.

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

Compiler output

Implementation: T:regs
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2s.c: blake2s.c: In function 'crypto_hash_blake2s_regs_timingleaks':
blake2s.c: blake2s.c:796:11: warning: conversion from 'long unsigned int' to 'uint32_t' {aka 'unsigned int'} changes value from '18446744073180816980' to '3766232660' [-Woverflow]
blake2s.c: 796 | v14 = ~0x1F83D9ABUL;
blake2s.c: | ^

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

Compiler output

Implementation: T:xmm
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
blake2s.c: In file included from blake2s.c:21:
blake2s.c: ./blake2-config.h:68:2: error: "This code requires at least SSE2."
blake2s.c: #error "This code requires at least SSE2."
blake2s.c: ^
blake2s.c: In file included from blake2s.c:24:
blake2s.c: In file included from /usr/lib/llvm-10/lib/clang/10.0.0/include/emmintrin.h:13:
blake2s.c: In file included from /usr/lib/llvm-10/lib/clang/10.0.0/include/xmmintrin.h:13:
blake2s.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
blake2s.c: return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
blake2s.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2s.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
blake2s.c: return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
blake2s.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2s.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
blake2s.c: return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
blake2s.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2s.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
blake2s.c: return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
blake2s.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2s.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
blake2s.c: return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
blake2s.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2s.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
blake2s.c: return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
blake2s.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
blake2s.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:xmm
clang -march=rv64imafdc -mtune=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:xmm
clang -march=rv64imafdc -mtune=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:xmm
clang -march=rv64imafdc -mtune=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:xmm
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:xmm

Compiler output

Implementation: T:xmm
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
blake2s.c: In file included from blake2s.c:19:
blake2s.c: blake2.h:101:5: error: size of array element is not a multiple of its alignment
blake2s.c: 101 | blake2s_state S[8][1];
blake2s.c: | ^~~~~~~~~~~~~
blake2s.c: blake2.h:102:5: error: size of array element is not a multiple of its alignment
blake2s.c: 102 | blake2s_state R[1];
blake2s.c: | ^~~~~~~~~~~~~
blake2s.c: blake2.h:109:5: error: size of array element is not a multiple of its alignment
blake2s.c: 109 | blake2b_state S[4][1];
blake2s.c: | ^~~~~~~~~~~~~
blake2s.c: blake2.h:110:5: error: size of array element is not a multiple of its alignment
blake2s.c: 110 | blake2b_state R[1];
blake2s.c: | ^~~~~~~~~~~~~
blake2s.c: In file included from blake2s.c:21:
blake2s.c: blake2-config.h:68:2: error: #error "This code requires at least SSE2."
blake2s.c: 68 | #error "This code requires at least SSE2."
blake2s.c: | ^~~~~
blake2s.c: blake2s.c:24:10: fatal error: emmintrin.h: No such file or directory
blake2s.c: 24 | #include <emmintrin.h>
blake2s.c: | ^~~~~~~~~~~~~
blake2s.c: compilation terminated.

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