aklomp / base64

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

NEON64: enc: no inline asm for clang -O0 #97

Closed mscdex closed 2 years ago

mscdex commented 2 years ago

This may not be the best fix, but it does allow compiling of debug builds with clang.

Also, as far as I can tell the NEON32 inline asm is not affected.

Fixes https://github.com/aklomp/base64/issues/96

aklomp commented 2 years ago

Hm, as mentioned in #96, I think there might be an easier fix, which is to have clang always load the encoding table with the vld1q_u8_x4 intrinsic. As far as I know, that intrinsic gets compiled correctly by clang, and will allocate four sequential registers. (GCC does not compile the intrinsic correctly and chooses four random registers.)