From 727a0a03a1413205134efbf95d8695da745a22a3 Mon Sep 17 00:00:00 2001 From: "kma@webrtc.org" Date: Wed, 1 Feb 2012 00:05:22 +0000 Subject: [PATCH] Fixed a bug in assembly code in aecm_core.c (hasn't caused a problem yet). Did apm unit test. Bit exact. Review URL: https://webrtc-codereview.appspot.com/366010 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1583 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/audio_processing/aecm/aecm_core.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/modules/audio_processing/aecm/aecm_core.c b/src/modules/audio_processing/aecm/aecm_core.c index 9bf5c4a54..4a51d56a8 100644 --- a/src/modules/audio_processing/aecm/aecm_core.c +++ b/src/modules/audio_processing/aecm/aecm_core.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -1478,10 +1478,14 @@ static int TimeToFrequencyDomain(const WebRtc_Word16* time_signal, (WebRtc_UWord16)tmp16no2; #else #ifdef WEBRTC_ARCH_ARM_V7A - __asm__("smulbb %0, %1, %2" : "=r"(tmp32no1) : "r"(freq_signal[i].real), - "r"(freq_signal[i].real)); - __asm__("smlabb %0, %1, %2, %3" :: "r"(tmp32no2), "r"(freq_signal[i].imag), - "r"(freq_signal[i].imag), "r"(tmp32no1)); + __asm __volatile( + "smulbb %[tmp32no1], %[real], %[real]\n\t" + "smlabb %[tmp32no2], %[imag], %[imag], %[tmp32no1]\n\t" + :[tmp32no1]"=r"(tmp32no1), + [tmp32no2]"=r"(tmp32no2) + :[real]"r"(freq_signal[i].real), + [imag]"r"(freq_signal[i].imag) + ); #else tmp16no1 = WEBRTC_SPL_ABS_W16(freq_signal[i].real); tmp16no2 = WEBRTC_SPL_ABS_W16(freq_signal[i].imag); @@ -2124,3 +2128,4 @@ void WebRtcAecm_FetchFarFrame(AecmCore_t * const aecm, WebRtc_Word16 * const far aecm->farBufReadPos += readLen; } +