still adjusting asm for better as compatibility..
authornotaz <notasas@gmail.com>
Sun, 31 Mar 2013 22:08:33 +0000 (01:08 +0300)
committernotaz <notasas@gmail.com>
Sun, 31 Mar 2013 22:17:20 +0000 (01:17 +0300)
include/arm_features.h
plugins/dfsound/arm_utils.S

index a1adfef..abfd876 100644 (file)
 
 /* no need for HAVE_NEON - GCC defines __ARM_NEON__ consistently */
 
-/* global function/external variable */
+/* global function/external symbol */
 #ifndef __MACH__
+#define ESYM(name) name
+
 #define FUNCTION(name) \
-  .global name; \
+  .globl name; \
   .type name, %function; \
   name
 
-#define EVAR(name) name
 #else
+#define ESYM(name) _##name
+
 #define FUNCTION(name) \
-  .globl _##name; \
-  _##name
+  .globl ESYM(name); \
+  name: \
+  ESYM(name)
 
-#define EVAR(name) _##name
 #endif
 
 #endif /* __ARM_FEATURES_H__ */
index ddc3714..cbcc7f7 100644 (file)
 
 #include "arm_features.h"
 
+#ifdef __MACH__
+.data
+.align 2
+ptr_ChanBuf:   .word _ChanBuf
+ptr_SSumLR:    .word _SSumLR
+ptr_sRVBStart: .word _sRVBStart
+#endif
+
 .text
 .align 2
 
 .macro load_varadr reg var
 #if defined(__ARM_ARCH_7A__) && !defined(__PIC__)
-       movw    \reg, #:lower16:EVAR(\var)
-       movt    \reg, #:upper16:EVAR(\var)
+       movw    \reg, #:lower16:ESYM(\var)
+       movt    \reg, #:upper16:ESYM(\var)
+#elif defined(__ARM_ARCH_7A__) && defined(__MACH__)
+       movw    \reg, #:lower16:(ptr_\var-(1678f+4))
+       movt    \reg, #:upper16:(ptr_\var-(1678f+4))
+1678:
+       ldr     \reg, [pc, \reg]
 #else
-       ldr     \reg, =EVAR(\var)
+       ldr     \reg, =ESYM(\var)
 #endif
 .endm