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/codecs/lib/mdct_arm.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/codecs/lib/mdct_arm.S') diff --git a/apps/codecs/lib/mdct_arm.S b/apps/codecs/lib/mdct_arm.S index f2fa1d9c3e..515b859b44 100644 --- a/apps/codecs/lib/mdct_arm.S +++ b/apps/codecs/lib/mdct_arm.S @@ -127,7 +127,7 @@ mdct_butterfly_16: @ mdct_butterfly_8 increments r0 by another #8*4 here @ at end, r0 has been incremented by #16*4 - ldr pc, [sp], #4 + ldrpc mdct_butterfly_32: stmdb sp!, {r4-r11, lr} @@ -257,7 +257,7 @@ mdct_butterfly_32: @ and we wanted to advance by #16*4 anyway, so just call again bl mdct_butterfly_16 - ldmia sp!, {r4-r11, pc} + ldmpc regs=r4-r11 @ mdct_butterfly_generic_loop(x1, x2, T0, step, Ttop) mdct_butterfly_generic_loop: @@ -433,5 +433,5 @@ mdct_butterfly_generic_loop: cmp r2, r4 bhi 1b - ldmia sp!, {r4-r11, pc} + ldmpc regs=r4-r11 -- cgit v1.2.3