From 45c7498f59ad2889f2120a865a51043004eddd5d Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Fri, 11 Jun 2010 04:41:36 +0000 Subject: FS#11335 by me: make ARM assembly functions thumb-friendly We can't pop into pc on ARMv4t when using thumb: the T bit won't be modified if we are returning to a thumb function Code running on ARMv4t should use the new ldrpc / ldmpc macros instead of ldr pc, [sp], #4 and ldm(cond) sp!, {regs, pc} No modification on pure ARM builds and ARMv5+ Note: USE_THUMB is currently never defined, no targets can currently be built with -mthumb, see FS#6734 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26756 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/mpegplayer/idct_arm.S | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'apps/plugins/mpegplayer/idct_arm.S') diff --git a/apps/plugins/mpegplayer/idct_arm.S b/apps/plugins/mpegplayer/idct_arm.S index 7253d890bf..97a87a8b59 100644 --- a/apps/plugins/mpegplayer/idct_arm.S +++ b/apps/plugins/mpegplayer/idct_arm.S @@ -19,6 +19,8 @@ * ****************************************************************************/ +#include "config.h" + .global mpeg2_idct_copy .type mpeg2_idct_copy, %function .global mpeg2_idct_add @@ -313,7 +315,7 @@ mpeg2_idct_copy: add r1, r1, r2 cmp r0, r12 blo 1b - ldmfd sp!, { r4-r11, pc } + ldmpc regs=r4-r11 mpeg2_idct_add: cmp r0, #129 @@ -385,7 +387,7 @@ mpeg2_idct_add: add r1, r1, r2 cmp r0, r12 blo 2b - ldmfd sp!, { r4-r11, pc } + ldmpc regs=r4-r11 3: stmfd sp!, { r4-r5, lr } ldrsh r1, [r0, #0] /* r1 = block[0] */ @@ -438,4 +440,4 @@ mpeg2_idct_add: add r2, r2, r3 cmp r2, r0 blo 4b - ldmfd sp!, { r4-r5, pc } + ldmpc regs=r4-r5 -- cgit v1.2.3