From cd3850c1d97d3a21e53e79c0a7feb6f052feb181 Mon Sep 17 00:00:00 2001 From: "Timothy B. Terriberry" <tterribe@xiph.org> Date: Wed, 22 May 2013 15:11:59 -0700 Subject: [PATCH] Port 1ed17cc2 to C_MUL and C_MUL4. Measures a 0.1% speedup on 96 kbps stereo encode+decode on a Cortex A8. --- celt/arm/kiss_fft_armv4.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/celt/arm/kiss_fft_armv4.h b/celt/arm/kiss_fft_armv4.h index 1f09eaba1..e4faad6f2 100644 --- a/celt/arm/kiss_fft_armv4.h +++ b/celt/arm/kiss_fft_armv4.h @@ -40,18 +40,18 @@ int tt__; \ __asm__ __volatile__( \ "#C_MUL\n\t" \ - "ldm %[ap], {r0,r1}\n\t" \ "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ "ldrsh %[bi], [%[bp], #2]\n\t" \ "smull %[tt], %[mi], r1, %[br]\n\t" \ "smlal %[tt], %[mi], r0, %[bi]\n\t" \ "rsb %[bi], %[bi], #0\n\t" \ - "smull r0, %[mr], %[br], r0\n\t" \ + "smull %[br], %[mr], r0, %[br]\n\t" \ "mov %[tt], %[tt], lsr #15\n\t" \ - "smlal r0, %[mr], r1, %[bi]\n\t" \ + "smlal %[br], %[mr], r1, %[bi]\n\t" \ "orr %[mi], %[tt], %[mi], lsl #17\n\t" \ - "mov r0, r0, lsr #15\n\t" \ - "orr %[mr], r0, %[mr], lsl #17\n\t" \ + "mov %[br], %[br], lsr #15\n\t" \ + "orr %[mr], %[br], %[mr], lsl #17\n\t" \ : [mr]"=r"((m).r), [mi]"=r"((m).i), \ [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ : [ap]"r"(&(a)), [bp]"r"(&(b)) \ @@ -68,18 +68,18 @@ int tt__; \ __asm__ __volatile__( \ "#C_MUL4\n\t" \ - "ldm %[ap], {r0,r1}\n\t" \ "ldrsh %[br], [%[bp], #0]\n\t" \ + "ldm %[ap], {r0,r1}\n\t" \ "ldrsh %[bi], [%[bp], #2]\n\t" \ "smull %[tt], %[mi], r1, %[br]\n\t" \ "smlal %[tt], %[mi], r0, %[bi]\n\t" \ "rsb %[bi], %[bi], #0\n\t" \ - "smull r0, %[mr], %[br], r0\n\t" \ + "smull %[br], %[mr], r0, %[br]\n\t" \ "mov %[tt], %[tt], lsr #17\n\t" \ - "smlal r0, %[mr], r1, %[bi]\n\t" \ + "smlal %[br], %[mr], r1, %[bi]\n\t" \ "orr %[mi], %[tt], %[mi], lsl #15\n\t" \ - "mov r0, r0, lsr #17\n\t" \ - "orr %[mr], r0, %[mr], lsl #15\n\t" \ + "mov %[br], %[br], lsr #17\n\t" \ + "orr %[mr], %[br], %[mr], lsl #15\n\t" \ : [mr]"=r"((m).r), [mi]"=r"((m).i), \ [br]"=&r"(br__), [bi]"=r"(bi__), [tt]"=r"(tt__) \ : [ap]"r"(&(a)), [bp]"r"(&(b)) \ -- GitLab