Implementation notes: amd64, hydra8, crypto_aead/norx6441v1

Computer: hydra8
Microarchitecture: amd64; Ivy Bridge+AES (306a9)
Architecture: amd64
CPU ID: GenuineIntel-000306a9-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: norx6441v1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
231589966 0 031581 804 1088T:xmmgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
232089966 0 032813 804 1088T:xmmgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
233249819 0 029248 780 1056T:xmmgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
2532612470 0 033572 796 1088T:xmmgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
2593911446 0 033048 860 1024T:xmmclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
2595411462 0 035008 860 1024T:xmmclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
2595411475 0 031144 860 1024T:xmmclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
2612410546 0 029906 852 1024T:xmmclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
2856515019 0 037248 860 1024T:xmmclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
338426507 8 028256 868 1024T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
339026459 8 030152 868 1024T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
339904090 8 023594 860 1024T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
341925467 8 025392 868 1024T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
350205808 8 028136 868 1024T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
368063966 8 023505 788 1056T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
378445234 8 026996 820 1088T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
391624395 8 025644 812 1088T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
4008210974 8 033964 820 1088T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE
norx.c: In function 'norx_decrypt_lastblock',
norx.c: inlined from 'norx_decrypt_msg' at norx.c:502:9,
norx.c: inlined from 'norx_decrypt_msg' at norx.c:490:6:
norx.c: norx.c:313:16: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
norx.c: 313 | b[j] = c;
norx.c: | ~~~~~~~^~~
norx.c: norx.c: In function 'norx_decrypt_msg':
norx.c: norx.c:287:13: note: at offset 8 into destination object 'b' of size 8
norx.c: 287 | uint8_t b[BYTES(NORX_W)];
norx.c: | ^
norx.c: In function 'norx_decrypt_lastblock',
norx.c: inlined from 'norx_decrypt_msg' at norx.c:502:9,
norx.c: inlined from 'norx_decrypt_msg' at norx.c:490:6,
norx.c: inlined from 'norx_aead_decrypt' at norx.c:688:5:
norx.c: norx.c:313:16: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
norx.c: 313 | b[j] = c;
norx.c: | ~~~~~~~^~~
norx.c: norx.c: In function 'norx_aead_decrypt':
norx.c: norx.c:287:13: note: at offset 8 into destination object 'b' of size 8
norx.c: 287 | uint8_t b[BYTES(NORX_W)];
norx.c: | ^

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

Compiler output

Implementation: T:ymm
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
norx.c: norx.c:355:5: error: '__builtin_ia32_insert128i256' needs target feature avx2
norx.c: INITIALIZE(A, B, C, D, N, K);
norx.c: ^
norx.c: norx.c:271:9: note: expanded from macro 'INITIALIZE'
norx.c: A = _mm256_inserti128_si256(A, _mm_set_epi64x(U1, U0), 1); \
norx.c: ^
norx.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:827:13: note: expanded from macro '_mm256_inserti128_si256'
norx.c: ((__m256i)__builtin_ia32_insert128i256((__v4di)(__m256i)(V1), \
norx.c: ^
norx.c: norx.c:355:5: error: '__builtin_ia32_permdi256' needs target feature avx2
norx.c: norx.c:272:9: note: expanded from macro 'INITIALIZE'
norx.c: A = _mm256_permute4x64_epi64(A, _MM_SHUFFLE(3, 1, 0, 2)); \
norx.c: ^
norx.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:818:13: note: expanded from macro '_mm256_permute4x64_epi64'
norx.c: ((__m256i)__builtin_ia32_permdi256((__v4di)(__m256i)(V), (int)(M)))
norx.c: ^
norx.c: norx.c:355:5: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'crypto_aead_norx6441v1_ymm_timingleaks_encrypt' that is compiled without support for 'avx2'
norx.c: norx.c:276:9: note: expanded from macro 'INITIALIZE'
norx.c: D = XOR(D, _mm256_set_epi64x(0, NORX_PARAMETER, 0, 0)); \
norx.c: ^
norx.c: norx.c:66:19: note: expanded from macro 'XOR'
norx.c: #define XOR(A, B) _mm256_xor_si256((A), (B))
norx.c: ^
norx.c: norx.c:355:5: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'crypto_aead_norx6441v1_ymm_timingleaks_encrypt' that is compiled without support for 'avx2'
norx.c: norx.c:277:5: note: expanded from macro 'INITIALIZE'
norx.c: ...

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

Compiler output

Implementation: T:ymm
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
norx.c: norx.c:350:24: error: always_inline function '_mm256_loadu_si256' requires target feature 'avx', but would be inlined into function 'crypto_aead_norx6441v1_ymm_timingleaks_encrypt' that is compiled without support for 'avx'
norx.c: const __m256i K = LOADU(k + 0);
norx.c: ^
norx.c: norx.c:47:19: note: expanded from macro 'LOADU'
norx.c: #define LOADU(in) _mm256_loadu_si256((__m256i*)(in))
norx.c: ^
norx.c: norx.c:350:24: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
norx.c: norx.c:47:19: note: expanded from macro 'LOADU'
norx.c: #define LOADU(in) _mm256_loadu_si256((__m256i*)(in))
norx.c: ^
norx.c: norx.c:355:5: error: always_inline function '_mm256_castsi128_si256' requires target feature 'avx', but would be inlined into function 'crypto_aead_norx6441v1_ymm_timingleaks_encrypt' that is compiled without support for 'avx'
norx.c: INITIALIZE(A, B, C, D, N, K);
norx.c: ^
norx.c: norx.c:270:9: note: expanded from macro 'INITIALIZE'
norx.c: A = _mm256_castsi128_si256(N); \
norx.c: ^
norx.c: norx.c:355:5: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
norx.c: norx.c:270:9: note: expanded from macro 'INITIALIZE'
norx.c: A = _mm256_castsi128_si256(N); \
norx.c: ^
norx.c: norx.c:355:5: error: '__builtin_ia32_insert128i256' needs target feature avx2
norx.c: norx.c:271:9: note: expanded from macro 'INITIALIZE'
norx.c: A = _mm256_inserti128_si256(A, _mm_set_epi64x(U1, U0), 1); \
norx.c: ^
norx.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx2intrin.h:827:13: note: expanded from macro '_mm256_inserti128_si256'
norx.c: ...

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

Compiler output

Implementation: T:ymm
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
norx.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
norx.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
norx.c: from norx.c:26:
norx.c: norx.c: In function 'crypto_aead_norx6441v1_ymm_timingleaks_encrypt':
norx.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:913:1: error: inlining failed in call to 'always_inline' '_mm256_xor_si256': target specific option mismatch
norx.c: 913 | _mm256_xor_si256 (__m256i __A, __m256i __B)
norx.c: | ^~~~~~~~~~~~~~~~
norx.c: norx.c:66:19: note: called from here
norx.c: 66 | #define XOR(A, B) _mm256_xor_si256((A), (B))
norx.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~
norx.c: norx.c:276:9: note: in expansion of macro 'XOR'
norx.c: 276 | D = XOR(D, _mm256_set_epi64x(0, NORX_PARAMETER, 0, 0)); \
norx.c: | ^~~
norx.c: norx.c:355:5: note: in expansion of macro 'INITIALIZE'
norx.c: 355 | INITIALIZE(A, B, C, D, N, K);
norx.c: | ^~~~~~~~~~
norx.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
norx.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86intrin.h:32,
norx.c: from norx.c:26:
norx.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:1071:1: error: inlining failed in call to 'always_inline' '_mm256_permute4x64_epi64': target specific option mismatch
norx.c: 1071 | _mm256_permute4x64_epi64 (__m256i __X, const int __M)
norx.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
norx.c: norx.c:272:9: note: called from here
norx.c: 272 | A = _mm256_permute4x64_epi64(A, _MM_SHUFFLE(3, 1, 0, 2)); \
norx.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
norx.c: ...

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