03-asm.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. diff --git a/simd/arm/jsimd_neon.S b/simd/arm/jsimd_neon.S
  2. index cd26127..e5c978f 100644
  3. --- a/simd/arm/aarch32/jsimd_neon.S
  4. +++ b/simd/arm/aarch32/jsimd_neon.S
  5. @@ -30,10 +30,16 @@
  6. .section .note.GNU-stack, "", %progbits /* mark stack as non-executable */
  7. #endif
  8. +#if defined(__clang__) && defined(__arm__)
  9. +#define LITE_ASM 1
  10. +#endif
  11. +
  12. .text
  13. +#ifndef LITE_ASM
  14. .fpu neon
  15. .arch armv7a
  16. .object_arch armv4
  17. +#endif
  18. .arm
  19. .syntax unified
  20. @@ -47,6 +53,9 @@
  21. .globl _\fname
  22. _\fname:
  23. #else
  24. +#ifndef LITE_ASM
  25. + .func \fname
  26. +#endif
  27. .global \fname
  28. #ifdef __ELF__
  29. .hidden \fname
  30. diff --git a/simd/nasm/jsimdext.inc b/simd/nasm/jsimdext.inc
  31. index b40901f..71a2172 100644
  32. --- a/simd/nasm/jsimdext.inc
  33. +++ b/simd/nasm/jsimdext.inc
  34. @@ -67,7 +67,7 @@
  35. %define SEG_TEXT _text align=32 public use32 class=CODE
  36. %define SEG_CONST _data align=32 public use32 class=DATA
  37. -%elifdef ELF ; ----(nasm -felf[64] -DELF ...)------------
  38. +%elifdef UNIX ; ----(nasm -felf[64] -DUNIX ...)------------
  39. ; * Linux
  40. ; * *BSD family Unix using elf format
  41. ; * Unix System V, including Solaris x86, UnixWare and SCO Unix
  42. @@ -77,7 +77,7 @@ section .note.GNU-stack noalloc noexec nowrite progbits
  43. ; -- segment definition --
  44. ;
  45. -%ifdef __x86_64__
  46. +%ifdef _x86_64_
  47. %define SEG_TEXT .text progbits align=32
  48. %define SEG_CONST .rodata progbits align=32
  49. %else
  50. @@ -130,7 +130,7 @@ section .note.GNU-stack noalloc noexec nowrite progbits
  51. ; --------------------------------------------------------------------------
  52. ; Common types
  53. ;
  54. -%ifdef __x86_64__
  55. +%ifdef _x86_64_
  56. %ifnidn __OUTPUT_FORMAT__, elfx32
  57. %define POINTER qword ; general pointer type
  58. %define SIZEOF_POINTER SIZEOF_QWORD ; sizeof(POINTER)
  59. @@ -230,7 +230,7 @@ section .note.GNU-stack noalloc noexec nowrite progbits
  60. ; --------------------------------------------------------------------------
  61. ; Hidden symbols
  62. ;
  63. -%ifdef ELF ; ----(nasm -felf[64] -DELF ...)--------
  64. +%ifdef UNIX ; ----(nasm -felf[64] -DUNIX ...)--------
  65. %define GLOBAL_FUNCTION(name) global EXTN(name):function hidden
  66. %define GLOBAL_DATA(name) global EXTN(name):data hidden
  67. %elifdef MACHO ; ----(nasm -fmacho -DMACHO ...)--------
  68. @@ -374,7 +374,7 @@ const_base:
  69. align %1, db 0 ; filling zeros
  70. %endmacro
  71. -%ifdef __x86_64__
  72. +%ifdef _x86_64_
  73. %ifdef WIN64