Implementation notes: riscv64, riscvunleashed000, crypto_aead/iscream14v1

Computer: riscvunleashed000
Microarchitecture: riscv64; U54 (sifive,u54-mc)
Architecture: riscv64
CPU ID: unknown CPU ID
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: iscream14v1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
15585019784 1024 024219 1808 848T:refgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011520231222
16292757924 1024 023201 1800 848T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011520231222
16292957924 1024 023201 1800 848T:refclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011520231222
16607756708 1024 021569 1800 848T:refclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011520231222
16608366708 1024 021569 1800 848T:refclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011520231222
30790784350 1024 017539 1792 841T:refclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011520231222
34395213088 1024 015849 1808 848T:refgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011520231222
42206432578 1024 013969 1792 848T:refgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011520231222
44501993180 1024 015567 1808 848T:refgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011520231222

Compiler output

Implementation: T:sse
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
iscream.c: iscream.c:198:5: error: invalid output constraint '=x' in asm
iscream.c: READ(tables[0], table);
iscream.c: ^
iscream.c: iscream.c:193:18: note: expanded from macro 'READ'
iscream.c: [data] "=x" (x): \
iscream.c: ^
iscream.c: iscream.c:200:10: error: use of unknown builtin '__builtin_ia32_psrldi128' [-Wimplicit-function-declaration]
iscream.c: t0 = shift_right(in[0]) & V(0xf);
iscream.c: ^
iscream.c: iscream.c:17:32: note: expanded from macro 'shift_right'
iscream.c: #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
iscream.c: ^
iscream.c: iscream.c:200:10: error: invalid conversion between vector type 'v16qi' (vector of 16 'char' values) and integer type 'int' of different size
iscream.c: t0 = shift_right(in[0]) & V(0xf);
iscream.c: ^~~~~~~~~~~~~~~~~~
iscream.c: iscream.c:17:25: note: expanded from macro 'shift_right'
iscream.c: #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
iscream.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iscream.c: iscream.c:201:10: error: invalid conversion between vector type 'v16qi' (vector of 16 'char' values) and integer type 'int' of different size
iscream.c: t1 = shift_right(in[2]) & V(0xf);
iscream.c: ^~~~~~~~~~~~~~~~~~
iscream.c: iscream.c:17:25: note: expanded from macro 'shift_right'
iscream.c: #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
iscream.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iscream.c: iscream.c:203:10: error: use of unknown builtin '__builtin_ia32_pshufb128' [-Wimplicit-function-declaration]
iscream.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:sse
clang -march=rv64imafdc -mtune=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:sse
clang -march=rv64imafdc -mtune=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:sse
clang -march=rv64imafdc -mtune=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:sse
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:sse

Compiler output

Implementation: T:sse
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
iscream.c: iscream.c: In function 'LBox16P':
iscream.c: iscream.c:17:32: warning: implicit declaration of function '__builtin_ia32_psrldi128' [-Wimplicit-function-declaration]
iscream.c: 17 | #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
iscream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
iscream.c: iscream.c:200:10: note: in expansion of macro 'shift_right'
iscream.c: 200 | t0 = shift_right(in[0]) & V(0xf);
iscream.c: | ^~~~~~~~~~~
iscream.c: iscream.c:200:5: error: cannot convert a value of type 'int' to vector type '__vector(16) char' which has different size
iscream.c: 200 | t0 = shift_right(in[0]) & V(0xf);
iscream.c: | ^~
iscream.c: iscream.c:201:5: error: cannot convert a value of type 'int' to vector type '__vector(16) char' which has different size
iscream.c: 201 | t1 = shift_right(in[2]) & V(0xf);
iscream.c: | ^~
iscream.c: iscream.c:203:10: warning: implicit declaration of function '__builtin_ia32_pshufb128'; did you mean '__builtin_fabsf128'? [-Wimplicit-function-declaration]
iscream.c: 203 | A = __builtin_ia32_pshufb128(table, t0);
iscream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
iscream.c: | __builtin_fabsf128
iscream.c: iscream.c:203:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
iscream.c: iscream.c:204:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
iscream.c: 204 | C = __builtin_ia32_pshufb128(table, t1);
iscream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
iscream.c: iscream.c:208:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
iscream.c: 208 | B = __builtin_ia32_pshufb128(table, t0);
iscream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
iscream.c: iscream.c:209:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
iscream.c: ...

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