summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-06-11 04:41:36 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-06-11 04:41:36 +0000
commit45c7498f59ad2889f2120a865a51043004eddd5d (patch)
tree1a62b0e8549a7f2750679de8d7dd3f82039c5719 /firmware/target/arm/ipod
parentfe7ca44471b309a0adea563cce947de9efb62ab5 (diff)
downloadrockbox-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')
-rw-r--r--firmware/target/arm/ipod/lcd-as-gray.S8
-rw-r--r--firmware/target/arm/ipod/video/lcd-as-video.S6
2 files changed, 8 insertions, 6 deletions
diff --git a/firmware/target/arm/ipod/lcd-as-gray.S b/firmware/target/arm/ipod/lcd-as-gray.S
index 1364c1f965..cfd179a714 100644
--- a/firmware/target/arm/ipod/lcd-as-gray.S
+++ b/firmware/target/arm/ipod/lcd-as-gray.S
@@ -97,7 +97,7 @@ lcd_write_data_shifted:
subs r1, r1, #1
bne .sloop
- ldmfd sp!, {r4, pc}
+ ldmpc regs=r4
.size lcd_write_data_shifted,.-lcd_write_data_shifted
#elif defined IPOD_MINI
@@ -132,7 +132,7 @@ lcd_write_data_shifted:
subs r1, r1, #1
bne .sloop
- ldr pc, [sp], #4
+ ldrpc
.size lcd_write_data_shifted,.-lcd_write_data_shifted
#endif
@@ -179,7 +179,7 @@ lcd_mono_data:
subs r1, r1, #1
bne .mloop
- ldmfd sp!, {r4, pc}
+ ldmpc regs=r4
.dibits:
.byte 0x00, 0x03, 0x0C, 0x0F, 0x30, 0x33, 0x3C, 0x3F
@@ -267,6 +267,6 @@ lcd_grey_data:
subs r2, r2, #1
bne .greyloop
- ldmfd sp!, {r4-r7, pc}
+ ldmpc regs=r4-r7
.size lcd_grey_data,.-lcd_grey_data
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 @@
*
****************************************************************************/
+#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