aklomp / base64

Fast Base64 stream encoder/decoder in C99, with SIMD acceleration
BSD 2-Clause "Simplified" License
866 stars 162 forks source link

Inlining Failed under GCC7 #48

Closed iamthebot closed 6 years ago

iamthebot commented 6 years ago

Compiling under GCC7 on OSX w/ AVX2:

fastbase64 git:(master) CC=gcc-7 CXX=g++-7 AVX2_CFLAGS=-mavx2 make
gcc-7 -fPIC -std=c99 -Wall -Wextra -Wshadow -Wpsabi -Wfatal-errors -O3 -march=native -march=native -mavx2 -c src/chromiumbase64.c -Iinclude
gcc-7 -fPIC -std=c99 -Wall -Wextra -Wshadow -Wpsabi -Wfatal-errors -O3 -march=native -march=native -mavx2 -c src/fastavxbase64.c -Iinclude
gcc-7 -fPIC -std=c99 -Wall -Wextra -Wshadow -Wpsabi -Wfatal-errors -O3 -march=native -march=native -mavx2 -c src/fastavx512bwbase64.c -Iinclude
src/fastavx512bwbase64.c: In function 'enc_reshuffle':
src/fastavx512bwbase64.c:6:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
 static inline __m512i enc_reshuffle(const __m512i input) {

 ^~~~~~
src/fastavx512bwbase64.c:6:23: note: The ABI for passing parameters with 64-byte alignment has changed in GCC 4.6
 static inline __m512i enc_reshuffle(const __m512i input) {
                       ^~~~~~~~~~~~~
In file included from /usr/local/Cellar/gcc/7.3.0_1/lib/gcc/7/gcc/x86_64-apple-darwin17.3.0/7.3.0/include/immintrin.h:55:0,
                 from /usr/local/Cellar/gcc/7.3.0_1/lib/gcc/7/gcc/x86_64-apple-darwin17.3.0/7.3.0/include/x86intrin.h:48,
                 from src/fastavx512bwbase64.c:3:
/usr/local/Cellar/gcc/7.3.0_1/lib/gcc/7/gcc/x86_64-apple-darwin17.3.0/7.3.0/include/avx512bwintrin.h:1831:1: error: inlining failed in call to always_inline '_mm512_shuffle_epi8': target specific option mismatch
 _mm512_shuffle_epi8 (__m512i __A, __m512i __B)
 ^~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
make: *** [fastavx512bwbase64.o] Error 1