Implementation notes: aarch64, pi3bplus, crypto_kem/saber2

Computer: pi3bplus
Architecture: aarch64
CPU ID: 410fd034
SUPERCOP version: 20200702
Operation: crypto_kem
Primitive: saber2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
70676385141 0 0100643 784 4016neonclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020070220200702
97700672467 0 088464 784 1600refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020060820200603
108994738721 0 055223 848 1616refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020060820200603
313891712285 0 027631 848 1600refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020060820200603
375995011371 0 025631 832 1584refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020060820200603
478357311757 0 026991 848 1600refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020060820200603

Compiler output

Implementation: crypto_kem/saber2/avx2
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
SABER_indcpa.c: In file included from SABER_indcpa.c:5:
SABER_indcpa.c: In file included from ./SABER_indcpa.h:4:
SABER_indcpa.c: In file included from /usr/lib/llvm-7/lib/clang/7.0.1/include/immintrin.h:28:
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:64:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
SABER_indcpa.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:143:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
SABER_indcpa.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:173:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
SABER_indcpa.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:203:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
SABER_indcpa.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:230:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
SABER_indcpa.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:253:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
SABER_indcpa.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:274:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
SABER_indcpa.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SABER_indcpa.c: /usr/lib/llvm-7/lib/clang/7.0.1/include/mmintrin.h:301:12: error: invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
SABER_indcpa.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE avx2

Compiler output

Implementation: crypto_kem/saber2/neon
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
poly.c: poly.c:19:3: warning: implicit declaration of function 'cshake128_simple' is invalid in C99 [-Wimplicit-function-declaration]
poly.c: cshake128_simple(buf,SABER_N,nonce,seed,SABER_NOISESEEDBYTES);
poly.c: ^
poly.c: poly.c:34:3: warning: implicit declaration of function 'cshake128_simple' is invalid in C99 [-Wimplicit-function-declaration]
poly.c: cshake128_simple(buf0,SABER_N,nonce0,seed,SABER_NOISESEEDBYTES);
poly.c: ^
poly.c: 2 warnings generated.

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE neon

Compiler output

Implementation: crypto_kem/saber2/avx2
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
SABER_indcpa.c: In file included from SABER_indcpa.c:5:
SABER_indcpa.c: SABER_indcpa.h:4:10: fatal error: immintrin.h: No such file or directory
SABER_indcpa.c: #include <immintrin.h>
SABER_indcpa.c: ^~~~~~~~~~~~~
SABER_indcpa.c: compilation terminated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE avx2

Compiler output

Implementation: crypto_kem/saber2/neon
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
SABER_indcpa.c: In file included from polymul/toom_cook_4/asimd_toom_cook_4way_neon.c:22,
SABER_indcpa.c: from SABER_indcpa.c:35:
SABER_indcpa.c: polymul/toom_cook_4/batch_64coefficient_multiplications.c: In function 'karatsuba32_fork_avx_new':
SABER_indcpa.c: polymul/toom_cook_4/batch_64coefficient_multiplications.c:44:22: warning: implicit declaration of function 'vst1q_u16_x2'; did you mean 'vld1q_u16_x2'? [-Wimplicit-function-declaration]
SABER_indcpa.c: #define vstore(c, a) vst1q_u16_x2(c, a);
SABER_indcpa.c: ^~~~~~~~~~~~
SABER_indcpa.c: polymul/toom_cook_4/batch_64coefficient_multiplications.c:85:3: note: in expansion of macro 'vstore'
SABER_indcpa.c: vstore(&a[position*16], a1[0]);
SABER_indcpa.c: ^~~~~~
poly.c: poly.c: In function 'poly_getnoise':
poly.c: poly.c:19:3: warning: implicit declaration of function 'cshake128_simple'; did you mean 'shake128'? [-Wimplicit-function-declaration]
poly.c: cshake128_simple(buf,SABER_N,nonce,seed,SABER_NOISESEEDBYTES);
poly.c: ^~~~~~~~~~~~~~~~
poly.c: shake128
try.c: /usr/bin/ld: crypto_kem_saber2.a(SABER_indcpa.o): in function `karatsuba32_join_avx_new':
try.c: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: crypto_kem_saber2.a(SABER_indcpa.o): in function `karatsuba32_join_avx_partial':
try.c: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: crypto_kem_saber2.a(SABER_indcpa.o):SABER_indcpa.c:(.text+0x...): more undefined references to `vst1q_u16_x2' follow
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 3, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE neon
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE neon
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE neon

Compiler output

Implementation: crypto_kem/saber2/neon
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
SABER_indcpa.c: In file included from polymul/toom_cook_4/asimd_toom_cook_4way_neon.c:22,
SABER_indcpa.c: from SABER_indcpa.c:35:
SABER_indcpa.c: polymul/toom_cook_4/batch_64coefficient_multiplications.c: In function 'karatsuba32_fork_avx_new':
SABER_indcpa.c: polymul/toom_cook_4/batch_64coefficient_multiplications.c:44:22: warning: implicit declaration of function 'vst1q_u16_x2'; did you mean 'vld1q_u16_x2'? [-Wimplicit-function-declaration]
SABER_indcpa.c: #define vstore(c, a) vst1q_u16_x2(c, a);
SABER_indcpa.c: ^~~~~~~~~~~~
SABER_indcpa.c: polymul/toom_cook_4/batch_64coefficient_multiplications.c:85:3: note: in expansion of macro 'vstore'
SABER_indcpa.c: vstore(&a[position*16], a1[0]);
SABER_indcpa.c: ^~~~~~
poly.c: poly.c: In function 'poly_getnoise':
poly.c: poly.c:19:3: warning: implicit declaration of function 'cshake128_simple'; did you mean 'shake128'? [-Wimplicit-function-declaration]
poly.c: cshake128_simple(buf,SABER_N,nonce,seed,SABER_NOISESEEDBYTES);
poly.c: ^~~~~~~~~~~~~~~~
poly.c: shake128
try.c: /usr/bin/ld: crypto_kem_saber2.a(SABER_indcpa.o): in function `karatsuba32_fork_avx_new':
try.c: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: SABER_indcpa.c:(.text+0x...): undefined reference to `vst1q_u16_x2'
try.c: /usr/bin/ld: crypto_kem_saber2.a(SABER_indcpa.o):SABER_indcpa.c:(.text+0x...): more undefined references to `vst1q_u16_x2' follow
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE neon

Namespace violations

Implementation: crypto_kem/saber2/ref
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
SABER_indcpa.o GenMatrix T
SABER_indcpa.o InnerProd T
SABER_indcpa.o MatrixVectorMul T
SABER_indcpa.o POL2MSG T
SABER_indcpa.o clock1 C
SABER_indcpa.o clock2 C
SABER_indcpa.o clock_cl_mv C
SABER_indcpa.o clock_cl_sm C
SABER_indcpa.o clock_kp_mv C
SABER_indcpa.o clock_kp_sm C
SABER_indcpa.o indcpa_kem_dec T
SABER_indcpa.o indcpa_kem_enc T
SABER_indcpa.o indcpa_kem_keypair T
SABER_indcpa.o karatsuba_simple T
SABER_indcpa.o pol_mul T
SABER_indcpa.o print_poly2 T
SABER_indcpa.o reduce T
SABER_indcpa.o toom_cook_4way T
cbd.o cbd T
fips202.o KeccakF1600_StatePermute T
fips202.o cshake128_simple T
fips202.o cshake128_simple_absorb T
fips202.o cshake128_simple_squeezeblocks T
fips202.o sha3_256 T
fips202.o sha3_512 T
fips202.o shake128 T
kem.o clock1 C
kem.o clock2 C
kem.o clock_cl_mv C
kem.o clock_cl_sm C
kem.o clock_kp_mv C
kem.o clock_kp_sm C
pack_unpack.o BS2POL T
pack_unpack.o BS2POLVEC T
pack_unpack.o BS2POLVECp T
pack_unpack.o BS2POLVECq T
pack_unpack.o POLVEC2BS T
pack_unpack.o POLVECp2BS T
pack_unpack.o POLVECq2BS T
pack_unpack.o SABER_pack_3bit T
pack_unpack.o SABER_pack_4bit T
pack_unpack.o SABER_pack_6bit T
pack_unpack.o SABER_un_pack3bit T
pack_unpack.o SABER_un_pack4bit T
pack_unpack.o SABER_un_pack6bit T
poly.o GenSecret T
verify.o cmov T
verify.o verify T

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

Namespace violations

Implementation: crypto_kem/saber2/neon
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
SABER_indcpa.o BS2POLq T
SABER_indcpa.o GenMatrix T
SABER_indcpa.o GenSecret T
SABER_indcpa.o POL2MSG T
SABER_indcpa.o a C
SABER_indcpa.o a_extra C
SABER_indcpa.o b C
SABER_indcpa.o b_extra C
SABER_indcpa.o batch_64coefficient_multiplications T
SABER_indcpa.o c_avx C
SABER_indcpa.o c_avx_extra C
SABER_indcpa.o indcpa_kem_dec T
SABER_indcpa.o indcpa_kem_enc T
SABER_indcpa.o indcpa_kem_keypair T
SABER_indcpa.o join_32coefficient_results T
SABER_indcpa.o karatsuba32_join_avx_new T
SABER_indcpa.o karatsuba32_join_avx_partial T
SABER_indcpa.o karatsuba32_join_avx_partial2 T
SABER_indcpa.o printArray T
SABER_indcpa.o schoolbook_neon_new T
SABER_indcpa.o tmp C
SABER_indcpa.o toom_cook_4way_neon T
SABER_indcpa.o transpose T
cbd.o cbd T
fips202.o KeccakF1600_StatePermute T
fips202.o cshake128_simple T
fips202.o cshake128_simple_absorb T
fips202.o cshake128_simple_squeezeblocks T
fips202.o sha3_256 T
fips202.o sha3_512 T
fips202.o shake128 T
pack_unpack.o BS2POLVEC T
pack_unpack.o BS2POLVECp T
pack_unpack.o BS2POLVECq T
pack_unpack.o POLVEC2BS T
pack_unpack.o POLVECp2BS T
pack_unpack.o POLVECq2BS T
pack_unpack.o SABER_pack10bit T
pack_unpack.o SABER_pack11bit T
pack_unpack.o SABER_pack13bit T
pack_unpack.o SABER_pack14bit T
pack_unpack.o SABER_pack_3bit T
pack_unpack.o SABER_pack_4bit T
pack_unpack.o SABER_pack_6bit T
pack_unpack.o SABER_poly_un_pack13bit T
pack_unpack.o SABER_un_pack10bit T
pack_unpack.o SABER_un_pack11bit T
pack_unpack.o SABER_un_pack13bit T
pack_unpack.o SABER_un_pack14bit T
pack_unpack.o SABER_un_pack3bit T
pack_unpack.o SABER_un_pack4bit T
pack_unpack.o SABER_un_pack6bit T
poly.o poly_getnoise T
poly.o poly_getnoise4x T
verify.o cmov T
verify.o verify T

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE neon