common_audio/signal_processing: Fixes arm compilation issues with gcc 4.8

In r6240 gcc was rolled from 4.6 to 4.8 changing the behavior on arm. The output of ComplexFFT differs causing both AECM and NS to perform worse. Looking at issues on gcc it says that there could be a memory shuffling/optimization despite using volatile affecting the output.
Splitting the three instructions in one call into two separate calls makes the compiler take proper actions resulting in correct outputs.

BUG=3370,3395
TESTED=trybots
R=kwiberg@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/21549004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6261 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org 2014-05-28 08:45:04 +00:00
parent 0aa3ee661c
commit aca5939dfc
2 changed files with 6 additions and 6 deletions

View File

@ -118,15 +118,15 @@ int WebRtcSpl_ComplexFFT(int16_t frfi[], int stages, int mode)
__asm __volatile(
"pkhbt %[frfi_r], %[frfi_even], %[frfi_odd], lsl #16\n\t"
"smlsd %[tr32], %[wri], %[frfi_r], %[cfftrnd]\n\t"
"smladx %[ti32], %[wri], %[frfi_r], %[cfftrnd]\n\t"
:[frfi_r]"+r"(frfi_r),
[tr32]"=r"(tr32),
[ti32]"=r"(ti32)
[tr32]"=r"(tr32)
:[frfi_even]"r"((int32_t)frfi[2*j]),
[frfi_odd]"r"((int32_t)frfi[2*j +1]),
[wri]"r"(wri),
[cfftrnd]"r"(CFFTRND)
);
__asm __volatile("smladx %0, %1, %2, %3\n\t" : "=r"(ti32) :
"r"(wri), "r"(frfi_r), "r"(CFFTRND));
#else
tr32 = WEBRTC_SPL_MUL_16_16(wr, frfi[2 * j])

View File

@ -49,7 +49,7 @@ TEST_F(RealFFTTest, CreateFailsOnBadInput) {
EXPECT_TRUE(fft == NULL);
}
TEST_F(RealFFTTest, DISABLED_ON_ANDROID(RealAndComplexMatch)) {
TEST_F(RealFFTTest, RealAndComplexMatch) {
int i = 0;
int j = 0;
int16_t real_fft_time[kTimeDataLength] = {0};