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 --- firmware/target/arm/memmove-arm.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/target/arm/memmove-arm.S') diff --git a/firmware/target/arm/memmove-arm.S b/firmware/target/arm/memmove-arm.S index ce056d956b..d8cab048be 100644 --- a/firmware/target/arm/memmove-arm.S +++ b/firmware/target/arm/memmove-arm.S @@ -112,7 +112,7 @@ memmove: strneb r3, [r0, #-1]! strcsb r4, [r0, #-1]! strcsb ip, [r0, #-1] - ldmfd sp!, {r0, r4, pc} + ldmpc regs="r0, r4" 9: cmp ip, #2 ldrgtb r3, [r1, #-1]! -- cgit v1.2.3