diff options
author | Seth Shelnutt <shelnutt2@gmail.com> | 2012-07-16 11:55:12 -0400 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2012-09-24 12:41:52 -0700 |
commit | 49fa8770b0adce84246d5db3feec09db02eeeaee (patch) | |
tree | c4e14f0a4e8abac64c5ef28d4612bb04e1f6d06e /libFDK/include/arm/fixmadd_arm.h | |
parent | 2228e360595641dd906bf1773307f43d304f5b2e (diff) | |
download | android_external_aac-49fa8770b0adce84246d5db3feec09db02eeeaee.tar.gz android_external_aac-49fa8770b0adce84246d5db3feec09db02eeeaee.tar.bz2 android_external_aac-49fa8770b0adce84246d5db3feec09db02eeeaee.zip |
libFDK in libaac: Add conditional definition to switch arm asm forjellybean-stablejellybean
devices that don't support thumb2. Tested on heroc with armv6j.
Change-Id: If93892e920097ac7bdfa3f15d2ad1ee6d04bdcc6
Diffstat (limited to 'libFDK/include/arm/fixmadd_arm.h')
-rw-r--r-- | libFDK/include/arm/fixmadd_arm.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/libFDK/include/arm/fixmadd_arm.h b/libFDK/include/arm/fixmadd_arm.h index e12d211..cfa1f71 100644 --- a/libFDK/include/arm/fixmadd_arm.h +++ b/libFDK/include/arm/fixmadd_arm.h @@ -96,11 +96,20 @@ amm-info@iis.fraunhofer.de /* ARM GNU GCC */ #define FUNCTION_fixmadddiv2_DD + #if defined(__thumb__) && !defined(__thumb2__) + # define __SWITCH_TO_ARM \ + ".align\n" \ + ".arm\n" + + #else + # define __SWITCH_TO_ARM /* nothing */ + #endif #ifdef __ARM_ARCH_6__ inline FIXP_DBL fixmadddiv2_DD (FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) { INT result; - asm ("smmla %0, %1, %2, %3;\n" + asm (__SWITCH_TO_ARM + "smmla %0, %1, %2, %3;\n" : "=r" (result) : "r" (a), "r" (b), "r"(x) ); return result ; @@ -108,7 +117,8 @@ amm-info@iis.fraunhofer.de #define FUNCTION_fixmsubdiv2_DD inline FIXP_DBL fixmsubdiv2_DD (FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) { INT result; - asm ("smmls %0, %1, %2, %3;\n" + asm (__SWITCH_TO_ARM + "smmls %0, %1, %2, %3;\n" : "=r" (result) : "r" (a), "r" (b), "r"(x) ); return result ; @@ -116,7 +126,8 @@ amm-info@iis.fraunhofer.de #else /* __ARM_ARCH_6__ */ inline FIXP_DBL fixmadddiv2_DD (FIXP_DBL x, const FIXP_DBL a, const FIXP_DBL b) { INT discard, result = x; - asm ("smlal %0, %1, %2, %3;\n" + asm (__SWITCH_TO_ARM + "smlal %0, %1, %2, %3;\n" : "=r" (discard), "+r" (result) : "r" (a), "r" (b) ); return result ; @@ -129,7 +140,8 @@ amm-info@iis.fraunhofer.de inline FIXP_DBL fixmadddiv2_DS (FIXP_DBL x, const FIXP_DBL a, const FIXP_SGL b) { INT result; - asm("smlawb %0, %1, %2, %3 " + asm(__SWITCH_TO_ARM + "smlawb %0, %1, %2, %3 " : "=r" (result) : "r" (a), "r" (b), "r" (x) ); return result ; |