shithub: opus

Download patch

ref: e70faf98b0465e4f278c72ce2d7b4ad10221a2f2
parent: f17623f2f9c7b129ba6b27f2c32fdfed70a5736c
author: Martin Storsjo <[email protected]>
date: Sat Feb 8 07:59:18 EST 2014

arm: Use the UAL syntax for instructions

This is required in order to build using the built-in assembler
in clang.

Signed-off-by: Jean-Marc Valin <[email protected]>

--- a/celt/arm/arm2gnu.pl
+++ b/celt/arm/arm2gnu.pl
@@ -49,6 +49,8 @@
 $thumb = 0;     # ARM mode by default, not Thumb.
 @proc_stack = ();
 
+printf ("    .syntax unified\n");
+
 LINE:
 while (<>) {
 
--- a/celt/arm/celt_pitch_xcorr_arm.s
+++ b/celt/arm/celt_pitch_xcorr_arm.s
@@ -309,7 +309,7 @@
   SUBS         r2, r2, #1         ; j--
   ; Stall
   SMLABB       r6, r12, r10, r6   ; sum[0] = MAC16_16(sum[0],x,y_0)
-  LDRGTH       r14, [r4], #2      ; r14 = *x++
+  LDRHGT       r14, [r4], #2      ; r14 = *x++
   SMLABT       r7, r12, r10, r7   ; sum[1] = MAC16_16(sum[1],x,y_1)
   SMLABB       r8, r12, r11, r8   ; sum[2] = MAC16_16(sum[2],x,y_2)
   SMLABT       r9, r12, r11, r9   ; sum[3] = MAC16_16(sum[3],x,y_3)
@@ -319,7 +319,7 @@
   SMLABB       r7, r14, r11, r7   ; sum[1] = MAC16_16(sum[1],x,y_2)
   LDRH         r10, [r5], #2      ; r10 = y_4 = *y++
   SMLABT       r8, r14, r11, r8   ; sum[2] = MAC16_16(sum[2],x,y_3)
-  LDRGTH       r12, [r4], #2      ; r12 = *x++
+  LDRHGT       r12, [r4], #2      ; r12 = *x++
   SMLABB       r9, r14, r10, r9   ; sum[3] = MAC16_16(sum[3],x,y_4)
   BLE xcorr_kernel_edsp_done
   SMLABB       r6, r12, r11, r6   ; sum[0] = MAC16_16(sum[0],tmp,y_2)
@@ -327,7 +327,7 @@
   SMLABT       r7, r12, r11, r7   ; sum[1] = MAC16_16(sum[1],tmp,y_3)
   LDRH         r2, [r5], #2       ; r2 = y_5 = *y++
   SMLABB       r8, r12, r10, r8   ; sum[2] = MAC16_16(sum[2],tmp,y_4)
-  LDRGTH       r14, [r4]          ; r14 = *x
+  LDRHGT       r14, [r4]          ; r14 = *x
   SMLABB       r9, r12, r2, r9    ; sum[3] = MAC16_16(sum[3],tmp,y_5)
   BLE xcorr_kernel_edsp_done
   SMLABT       r6, r14, r11, r6   ; sum[0] = MAC16_16(sum[0],tmp,y_3)
@@ -387,11 +387,11 @@
 celt_pitch_xcorr_edsp_process1u_loop4_done
   ADDS         r12, r12, #4
 celt_pitch_xcorr_edsp_process1u_loop1
-  LDRGEH       r6, [r4], #2
+  LDRHGE       r6, [r4], #2
   ; Stall
   SMLABBGE     r14, r6, r8, r14    ; sum = MAC16_16(sum, *x, *y)
-  SUBGES       r12, r12, #1
-  LDRGTH       r8, [r5], #2
+  SUBSGE       r12, r12, #1
+  LDRHGT       r8, [r5], #2
   BGT celt_pitch_xcorr_edsp_process1u_loop1
   ; Restore _x
   SUB          r4, r4, r3, LSL #1
@@ -474,7 +474,7 @@
   ADDS         r12, r12, #1
   ; Stall
   SMLABB       r10, r6, r8, r10     ; sum0 = MAC16_16(sum0, x_0, y_0)
-  LDRGTH       r7, [r4], #2
+  LDRHGT       r7, [r4], #2
   SMLABT       r11, r6, r8, r11     ; sum1 = MAC16_16(sum1, x_0, y_1)
   BLE celt_pitch_xcorr_edsp_process2_done
   LDRH         r9, [r5], #2
@@ -527,8 +527,8 @@
   SUBGE        r12, r12, #2
   SMLATTGE     r14, r6, r8, r14     ; sum = MAC16_16(sum, x_1, y_1)
   ADDS         r12, r12, #1
-  LDRGEH       r6, [r4], #2
-  LDRGEH       r8, [r5], #2
+  LDRHGE       r6, [r4], #2
+  LDRHGE       r8, [r5], #2
   ; Stall
   SMLABBGE     r14, r6, r8, r14     ; sum = MAC16_16(sum, *x, *y)
   ; maxcorr = max(maxcorr, sum)