remove-empty-asm-clobber.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Extended-Asm says
  2. asm [volatile] ( AssemblerTemplate : [OutputOperands] [ : [InputOperands] [ : [Clobbers] ] ] )
  3. which implies that Clobbers is optional even after the third colon, but
  4. the gcc used for b2g_try_emulator_dep builds says
  5. resample_neon.c: In function 'saturate_32bit_to_16bit':
  6. resample_neon.c:50: error: expected string literal before ')' token
  7. diff --git a/media/libspeex_resampler/src/resample_neon.c b/media/libspeex_resampler/src/resample_neon.c
  8. --- a/media/libspeex_resampler/src/resample_neon.c
  9. +++ b/media/libspeex_resampler/src/resample_neon.c
  10. @@ -41,18 +41,17 @@
  11. #include <arm_neon.h>
  12. #ifdef FIXED_POINT
  13. #ifdef __thumb2__
  14. static inline int32_t saturate_32bit_to_16bit(int32_t a) {
  15. int32_t ret;
  16. asm ("ssat %[ret], #16, %[a]"
  17. : [ret] "=&r" (ret)
  18. - : [a] "r" (a)
  19. - : );
  20. + : [a] "r" (a));
  21. return ret;
  22. }
  23. #else
  24. static inline int32_t saturate_32bit_to_16bit(int32_t a) {
  25. int32_t ret;
  26. asm ("vmov.s32 d0[0], %[a]\n"
  27. "vqmovn.s32 d0, q0\n"
  28. "vmov.s16 %[ret], d0[0]\n"