ARMv7 SIMD: Fix clang compatibility
By design, clang only supports Unified Assembler Language (and not
pre-UAL syntax):
https://llvm.org/bugs/show_bug.cgi?id=23507
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/BABJIHGJ.html
Thus, clang only supports the strbeq instruction and not streqb, but
unfortunately some versions of GCC only support streqb. Go, go
Gadget #ifdef...
Based on https://github.com/mattsarett/libjpeg-turbo/commit/a82e63aac63f8fa3
95fa4caad4de6859623ee2e2
Closes #75
diff --git a/ChangeLog.md b/ChangeLog.md
index 99ab595..06c0508 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -27,6 +27,9 @@
`tjDecompressHeader3()` was ignored (both cases represent incorrect usage of
the TurboJPEG API.)
+5. Fixed an issue in the ARM 32-bit SIMD-accelerated Huffman encoder that
+prevented the code from assembling properly with clang.
+
1.4.90 (1.5 beta1)
==================
diff --git a/simd/jsimd_arm_neon.S b/simd/jsimd_arm_neon.S
index 15c5409..06b7240 100644
--- a/simd/jsimd_arm_neon.S
+++ b/simd/jsimd_arm_neon.S
@@ -2457,7 +2457,11 @@
strb \TMP, [\BUFFER, #1]!
cmp \TMP, #0xff
/*it eq*/
+#if defined(__clang__)
+ strbeq \ZERO, [\BUFFER, #1]!
+#else
streqb \ZERO, [\BUFFER, #1]!
+#endif
.endm
.macro put_bits PUT_BUFFER, PUT_BITS, CODE, SIZE