Implementation notes: riscv64, riscvunleashed000, crypto_aead/scream12v1

Computer: riscvunleashed000
Microarchitecture: riscv64; U54 (sifive,u54-mc)
Architecture: riscv64
CPU ID: unknown CPU ID
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: scream12v1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
15470999916 0 025205 776 848T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011820231222
15471589916 0 025205 776 848T:refclang_-march=rv64imafdc_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011820231222
15712558658 0 023531 776 848T:refclang_-march=rv64imafdc_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011820231222
15712748658 0 023531 776 848T:refclang_-march=rv64imafdc_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011820231222
168942011720 0 026155 784 848T:refgcc_-mcpu=sifive-u54_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011820231222
27191645952 0 018761 784 848T:refgcc_-mcpu=sifive-u54_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011820231222
28843165330 0 016769 768 848T:refgcc_-mcpu=sifive-u54_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011820231222
30816646562 0 019763 768 841T:refclang_-march=rv64imafdc_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011820231222
31484255906 0 018341 784 848T:refgcc_-mcpu=sifive-u54_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011820231222

Compiler output

Implementation: T:sse
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
scream.c: scream.c:180:5: error: invalid output constraint '=x' in asm
scream.c: READ(tables[0], table);
scream.c: ^
scream.c: scream.c:175:18: note: expanded from macro 'READ'
scream.c: [data] "=x" (x): \
scream.c: ^
scream.c: scream.c:182:10: error: use of unknown builtin '__builtin_ia32_psrldi128' [-Wimplicit-function-declaration]
scream.c: t0 = shift_right(in[0]) & V(0xf);
scream.c: ^
scream.c: scream.c:16:32: note: expanded from macro 'shift_right'
scream.c: #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
scream.c: ^
scream.c: scream.c:182:10: error: invalid conversion between vector type 'v16qi' (vector of 16 'char' values) and integer type 'int' of different size
scream.c: t0 = shift_right(in[0]) & V(0xf);
scream.c: ^~~~~~~~~~~~~~~~~~
scream.c: scream.c:16:25: note: expanded from macro 'shift_right'
scream.c: #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
scream.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scream.c: scream.c:183:10: error: invalid conversion between vector type 'v16qi' (vector of 16 'char' values) and integer type 'int' of different size
scream.c: t1 = shift_right(in[2]) & V(0xf);
scream.c: ^~~~~~~~~~~~~~~~~~
scream.c: scream.c:16:25: note: expanded from macro 'shift_right'
scream.c: #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
scream.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scream.c: scream.c:185:10: error: use of unknown builtin '__builtin_ia32_pshufb128' [-Wimplicit-function-declaration]
scream.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
scream.c: scream.c: In function 'LBox16P':
scream.c: scream.c:16:32: warning: implicit declaration of function '__builtin_ia32_psrldi128' [-Wimplicit-function-declaration]
scream.c: 16 | #define shift_right(x) ((v16qi)__builtin_ia32_psrldi128((v4si)x, 4))
scream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
scream.c: scream.c:182:10: note: in expansion of macro 'shift_right'
scream.c: 182 | t0 = shift_right(in[0]) & V(0xf);
scream.c: | ^~~~~~~~~~~
scream.c: scream.c:182:5: error: cannot convert a value of type 'int' to vector type '__vector(16) char' which has different size
scream.c: 182 | t0 = shift_right(in[0]) & V(0xf);
scream.c: | ^~
scream.c: scream.c:183:5: error: cannot convert a value of type 'int' to vector type '__vector(16) char' which has different size
scream.c: 183 | t1 = shift_right(in[2]) & V(0xf);
scream.c: | ^~
scream.c: scream.c:185:10: warning: implicit declaration of function '__builtin_ia32_pshufb128'; did you mean '__builtin_fabsf128'? [-Wimplicit-function-declaration]
scream.c: 185 | A = __builtin_ia32_pshufb128(table, t0);
scream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
scream.c: | __builtin_fabsf128
scream.c: scream.c:185:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
scream.c: scream.c:186:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
scream.c: 186 | C = __builtin_ia32_pshufb128(table, t1);
scream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
scream.c: scream.c:190:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
scream.c: 190 | B = __builtin_ia32_pshufb128(table, t0);
scream.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
scream.c: scream.c:191:10: error: incompatible types when assigning to type 'v16qi' {aka '__vector(16) char'} from type 'int'
scream.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