Skip to content

Commit

Permalink
ARMv7 SIMD: Fix clang compatibility
Browse files Browse the repository at this point in the history
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 mattsarett/libjpeg-turbo@a82e63aac63f8fa3
95fa4caad4de6859623ee2e2

Closes flutter#75
  • Loading branch information
mattsarett authored and dcommander committed May 2, 2016
1 parent 0d61e80 commit 5e57638
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ calling `tjDecompressHeader3()`, or if the return value from
`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)
==================
Expand Down
4 changes: 4 additions & 0 deletions simd/jsimd_arm_neon.S
Original file line number Diff line number Diff line change
Expand Up @@ -2457,7 +2457,11 @@ asm_function jsimd_h2v1_fancy_upsample_neon
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
Expand Down

0 comments on commit 5e57638

Please sign in to comment.