From 8434c5e533e7a717e39040e77a4636956cdead9a Mon Sep 17 00:00:00 2001
From: Alexandre Relange <alexandre.relange@gmail.com>
Date: Fri, 15 Oct 2010 12:29:55 +0200
Subject: [PATCH] arm: allow compilation for specific ARMv5 architecture
remove ARMv6 specific assembler code with preprocessor macro
ugly version: using a previously declared macro which is defined
for an ARMv6-capable compiler. Its name is not explicit in this use
case.
---
src/pulsecore/svolume_arm.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/pulsecore/svolume_arm.c b/src/pulsecore/svolume_arm.c
index fdd8f09..a6a8e46 100644
|
a
|
b
|
|
| 35 | 35 | #include "sample-util.h" |
| 36 | 36 | #include "endianmacros.h" |
| 37 | 37 | |
| 38 | | #if defined (__arm__) |
| | 38 | #if defined (__arm__) && defined (ATOMIC_ARM_INLINE_ASM) |
| | 39 | /* |
| | 40 | These functions are removed if explicitly compiled for an architecture that cannot understand ARMV6 instructions (SSAT and PKHBT) |
| | 41 | */ |
| 39 | 42 | |
| 40 | 43 | #define MOD_INC() \ |
| 41 | 44 | " subs r0, r6, %2 \n\t" \ |
| … |
… |
|
| 182 | 185 | } |
| 183 | 186 | #endif |
| 184 | 187 | |
| 185 | | #endif /* defined (__arm__) */ |
| | 188 | #endif /* defined (__arm__) && defined (ATOMIC_ARM_INLINE_ASM) */ |
| 186 | 189 | |
| 187 | 190 | |
| 188 | 191 | void pa_volume_func_init_arm (pa_cpu_arm_flag_t flags) { |
| 189 | | #if defined (__arm__) |
| | 192 | #if defined (__arm__) && defined (ATOMIC_ARM_INLINE_ASM) |
| 190 | 193 | pa_log_info("Initialising ARM optimized functions."); |
| 191 | 194 | |
| 192 | 195 | #ifdef RUN_TEST |
| … |
… |
|
| 194 | 197 | #endif |
| 195 | 198 | |
| 196 | 199 | pa_set_volume_func (PA_SAMPLE_S16NE, (pa_do_volume_func_t) pa_volume_s16ne_arm); |
| 197 | | #endif /* defined (__arm__) */ |
| | 200 | #endif /* defined (__arm__) && defined (ATOMIC_ARM_INLINE_ASM) */ |
| 198 | 201 | } |