1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Rafaël Carré 2010-06-11 04:41:36 +00:00
parent fe7ca44471
commit 45c7498f59
39 changed files with 170 additions and 109 deletions

View file

@ -19,6 +19,8 @@
*
****************************************************************************/
#include "config.h"
.section .icode, "ax", %progbits
/****************************************************************************
@ -60,7 +62,7 @@ lcd_write_data: /* r1 = pixel count, must be even */
ldrne r3, [r0], #4
strne r3, [lr]
ldmfd sp!, {r4, pc}
ldmpc regs=r4
/****************************************************************************
* extern void lcd_write_yuv420_lines(unsigned char const * const src[3],
@ -294,7 +296,7 @@ lcd_write_yuv420_lines:
ldr r3, [sp, #12]
add sp, sp, r3 /* deallocate buffer */
ldmfd sp!, { r4-r10, pc } /* restore registers */
ldmpc regs=r4-r10 /* restore registers */
.ltorg
.size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines