From 4ae83961a97c97cf6bf7e775cc08337b292b9853 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 1 Apr 2013 01:08:33 +0300 Subject: [PATCH] still adjusting asm for better as compatibility.. --- include/arm_features.h | 15 +++++++++------ plugins/dfsound/arm_utils.S | 19 ++++++++++++++++--- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/include/arm_features.h b/include/arm_features.h index a1adfef5..abfd8762 100644 --- a/include/arm_features.h +++ b/include/arm_features.h @@ -25,20 +25,23 @@ /* 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__ */ diff --git a/plugins/dfsound/arm_utils.S b/plugins/dfsound/arm_utils.S index ddc37140..cbcc7f75 100644 --- a/plugins/dfsound/arm_utils.S +++ b/plugins/dfsound/arm_utils.S @@ -10,15 +10,28 @@ #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 -- 2.39.5