From 86429dbf1eca8ee0e08176997f508647c3abf6bd Mon Sep 17 00:00:00 2001 From: Chris Chua Date: Sun, 19 Mar 2023 06:22:08 +1100 Subject: Using ARM Unified Assembler Language Change-Id: Iae32a8ba8eff6087330e458fafc912a12fee4509 --- apps/plugins/mpegplayer/libmpeg2/idct_arm.S | 6 +++--- apps/plugins/mpegplayer/libmpeg2/idct_armv6.S | 7 ++++--- apps/plugins/mpegplayer/mpeg_misc.h | 22 ++++++++++++---------- 3 files changed, 19 insertions(+), 16 deletions(-) (limited to 'apps/plugins') diff --git a/apps/plugins/mpegplayer/libmpeg2/idct_arm.S b/apps/plugins/mpegplayer/libmpeg2/idct_arm.S index 97a87a8b59..90eb5031c7 100644 --- a/apps/plugins/mpegplayer/libmpeg2/idct_arm.S +++ b/apps/plugins/mpegplayer/libmpeg2/idct_arm.S @@ -43,8 +43,8 @@ ldrsh r7, [r0, #12] /* d2 */ ldrsh r8, [r0, #14] /* d3 */ orrs r9, r2, r3 - orreqs r9, r4, r5 - orreqs r9, r6, r7 + orrseq r9, r4, r5 + orrseq r9, r6, r7 cmpeq r8, #0 bne 2f mov r1, r1, asl #15 @@ -320,7 +320,7 @@ mpeg2_idct_copy: mpeg2_idct_add: cmp r0, #129 mov r0, r1 - ldreqsh r1, [r0, #0] + ldrsheq r1, [r0, #0] bne 1f and r1, r1, #0x70 cmp r1, #0x40 diff --git a/apps/plugins/mpegplayer/libmpeg2/idct_armv6.S b/apps/plugins/mpegplayer/libmpeg2/idct_armv6.S index dc53cbd7bd..a259721410 100644 --- a/apps/plugins/mpegplayer/libmpeg2/idct_armv6.S +++ b/apps/plugins/mpegplayer/libmpeg2/idct_armv6.S @@ -19,6 +19,7 @@ * ****************************************************************************/ +#include "config.h" .global mpeg2_idct_copy .type mpeg2_idct_copy, %function @@ -228,7 +229,7 @@ mpeg2_idct_copy: mpeg2_idct_add: cmp r0, #129 mov r0, r1 - ldreqsh r1, [r0, #0] + ldrsheq r1, [r0, #0] bne 1f and r1, r1, #0x70 cmp r1, #0x40 @@ -260,7 +261,7 @@ mpeg2_idct_add: strd r4, [r1] @ r4, r5 add r1, r1, r2 cmp r0, r3 - ldrlod r8, [r1] @ r8, r9 + ldrdlo r8, [r1] @ r8, r9 blo 2b ldmfd sp!, {r4-r11, pc} @@ -291,7 +292,7 @@ mpeg2_idct_add: strd r0, [r2] @ r0, r1 add r2, r2, r3 cmp r2, r12 - ldrlod r0, [r2] @ r0, r1 + ldrdlo r0, [r2] @ r0, r1 blo 4b ldmfd sp!, {r4, pc} diff --git a/apps/plugins/mpegplayer/mpeg_misc.h b/apps/plugins/mpegplayer/mpeg_misc.h index e04db0e19d..68ee8cac3c 100644 --- a/apps/plugins/mpegplayer/mpeg_misc.h +++ b/apps/plugins/mpegplayer/mpeg_misc.h @@ -53,12 +53,13 @@ enum state_enum #define CMP_3_CONST(_a, _b) \ ({ int _x; \ asm volatile ( \ + ".syntax unified \n" \ "ldrb %[x], [%[a], #0] \n" \ "eors %[x], %[x], %[b0] \n" \ - "ldreqb %[x], [%[a], #1] \n" \ - "eoreqs %[x], %[x], %[b1] \n" \ - "ldreqb %[x], [%[a], #2] \n" \ - "eoreqs %[x], %[x], %[b2] \n" \ + "ldrbeq %[x], [%[a], #1] \n" \ + "eorseq %[x], %[x], %[b1] \n" \ + "ldrbeq %[x], [%[a], #2] \n" \ + "eorseq %[x], %[x], %[b2] \n" \ : [x]"=&r"(_x) \ : [a]"r"(_a), \ [b0]"i"(((_b) >> 24) & 0xff), \ @@ -70,14 +71,15 @@ enum state_enum #define CMP_4_CONST(_a, _b) \ ({ int _x; \ asm volatile ( \ + ".syntax unified \n" \ "ldrb %[x], [%[a], #0] \n" \ "eors %[x], %[x], %[b0] \n" \ - "ldreqb %[x], [%[a], #1] \n" \ - "eoreqs %[x], %[x], %[b1] \n" \ - "ldreqb %[x], [%[a], #2] \n" \ - "eoreqs %[x], %[x], %[b2] \n" \ - "ldreqb %[x], [%[a], #3] \n" \ - "eoreqs %[x], %[x], %[b3] \n" \ + "ldrbeq %[x], [%[a], #1] \n" \ + "eorseq %[x], %[x], %[b1] \n" \ + "ldrbeq %[x], [%[a], #2] \n" \ + "eorseq %[x], %[x], %[b2] \n" \ + "ldrbeq %[x], [%[a], #3] \n" \ + "eorseq %[x], %[x], %[b3] \n" \ : [x]"=&r"(_x) \ : [a]"r"(_a), \ [b0]"i"(((_b) >> 24) & 0xff), \ -- cgit v1.2.3