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/ata-as-arm.S | |
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/ata-as-arm.S')
-rw-r--r-- | firmware/target/arm/ata-as-arm.S | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/ata-as-arm.S b/firmware/target/arm/ata-as-arm.S index b1cafc2221..101bc4dcc1 100644 --- a/firmware/target/arm/ata-as-arm.S +++ b/firmware/target/arm/ata-as-arm.S | |||
@@ -146,7 +146,7 @@ copy_read_sectors: | |||
146 | 146 | ||
147 | strb r3, [r0], #1 /* store final byte */ | 147 | strb r3, [r0], #1 /* store final byte */ |
148 | 148 | ||
149 | ldmfd sp!, {r4, r5, pc} | 149 | ldmpc regs=r4-r5 |
150 | 150 | ||
151 | /* 16-bit aligned */ | 151 | /* 16-bit aligned */ |
152 | .r_aligned: | 152 | .r_aligned: |
@@ -195,7 +195,7 @@ copy_read_sectors: | |||
195 | ldrneh r3, [r2] | 195 | ldrneh r3, [r2] |
196 | strneh r3, [r0], #2 | 196 | strneh r3, [r0], #2 |
197 | 197 | ||
198 | ldmfd sp!, {r4, r5, pc} | 198 | ldmpc regs=r4-r5 |
199 | 199 | ||
200 | .r_end: | 200 | .r_end: |
201 | .size copy_read_sectors,.r_end-copy_read_sectors | 201 | .size copy_read_sectors,.r_end-copy_read_sectors |
@@ -300,7 +300,7 @@ copy_write_sectors: | |||
300 | orr r3, r3, r4, lsl #8 | 300 | orr r3, r3, r4, lsl #8 |
301 | strh r3, [r2] /* write final halfword */ | 301 | strh r3, [r2] /* write final halfword */ |
302 | 302 | ||
303 | ldmfd sp!, {r4, r5, pc} | 303 | ldmpc regs=r4-r5 |
304 | 304 | ||
305 | /* 16-bit aligned */ | 305 | /* 16-bit aligned */ |
306 | .w_aligned: | 306 | .w_aligned: |
@@ -349,7 +349,7 @@ copy_write_sectors: | |||
349 | ldrneh r3, [r0], #2 | 349 | ldrneh r3, [r0], #2 |
350 | strneh r3, [r2] | 350 | strneh r3, [r2] |
351 | 351 | ||
352 | ldmfd sp!, {r4, r5, pc} | 352 | ldmpc regs=r4-r5 |
353 | 353 | ||
354 | .w_end: | 354 | .w_end: |
355 | .size copy_write_sectors,.w_end-copy_write_sectors | 355 | .size copy_write_sectors,.w_end-copy_write_sectors |