diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-11 04:41:36 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-11 04:41:36 +0000 |
commit | 45c7498f59ad2889f2120a865a51043004eddd5d (patch) | |
tree | 1a62b0e8549a7f2750679de8d7dd3f82039c5719 /firmware/target/arm/ipod/video | |
parent | fe7ca44471b309a0adea563cce947de9efb62ab5 (diff) | |
download | rockbox-45c7498f59ad2889f2120a865a51043004eddd5d.tar.gz rockbox-45c7498f59ad2889f2120a865a51043004eddd5d.zip |
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
Diffstat (limited to 'firmware/target/arm/ipod/video')
-rw-r--r-- | firmware/target/arm/ipod/video/lcd-as-video.S | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/target/arm/ipod/video/lcd-as-video.S b/firmware/target/arm/ipod/video/lcd-as-video.S index fa88dbc940..47155b8c75 100644 --- a/firmware/target/arm/ipod/video/lcd-as-video.S +++ b/firmware/target/arm/ipod/video/lcd-as-video.S | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | ||
23 | |||
22 | .section .icode, "ax", %progbits | 24 | .section .icode, "ax", %progbits |
23 | 25 | ||
24 | /**************************************************************************** | 26 | /**************************************************************************** |
@@ -60,7 +62,7 @@ lcd_write_data: /* r1 = pixel count, must be even */ | |||
60 | ldrne r3, [r0], #4 | 62 | ldrne r3, [r0], #4 |
61 | strne r3, [lr] | 63 | strne r3, [lr] |
62 | 64 | ||
63 | ldmfd sp!, {r4, pc} | 65 | ldmpc regs=r4 |
64 | 66 | ||
65 | /**************************************************************************** | 67 | /**************************************************************************** |
66 | * extern void lcd_write_yuv420_lines(unsigned char const * const src[3], | 68 | * extern void lcd_write_yuv420_lines(unsigned char const * const src[3], |
@@ -294,7 +296,7 @@ lcd_write_yuv420_lines: | |||
294 | 296 | ||
295 | ldr r3, [sp, #12] | 297 | ldr r3, [sp, #12] |
296 | add sp, sp, r3 /* deallocate buffer */ | 298 | add sp, sp, r3 /* deallocate buffer */ |
297 | ldmfd sp!, { r4-r10, pc } /* restore registers */ | 299 | ldmpc regs=r4-r10 /* restore registers */ |
298 | 300 | ||
299 | .ltorg | 301 | .ltorg |
300 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 302 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |