diff options
39 files changed, 170 insertions, 109 deletions
diff --git a/apps/codecs/demac/libdemac/predictor-arm.S b/apps/codecs/demac/libdemac/predictor-arm.S index 1d5587661a..92a78ed9b4 100644 --- a/apps/codecs/demac/libdemac/predictor-arm.S +++ b/apps/codecs/demac/libdemac/predictor-arm.S | |||
@@ -505,7 +505,11 @@ loop: | |||
505 | done: | 505 | done: |
506 | str r14, [r12] @ Save value of p->buf | 506 | str r14, [r12] @ Save value of p->buf |
507 | add sp, sp, #12 @ Don't bother restoring r1-r3 | 507 | add sp, sp, #12 @ Don't bother restoring r1-r3 |
508 | #ifdef ROCKBOX | ||
509 | ldmpc regs=r4-r11 | ||
510 | #else | ||
508 | ldmia sp!, {r4 - r11, pc} | 511 | ldmia sp!, {r4 - r11, pc} |
512 | #endif | ||
509 | 513 | ||
510 | move_hist: | 514 | move_hist: |
511 | @ dest = r11 (p->historybuffer) | 515 | @ dest = r11 (p->historybuffer) |
@@ -664,7 +668,11 @@ loopm: | |||
664 | donem: | 668 | donem: |
665 | str r14, [r12] @ Save value of p->buf | 669 | str r14, [r12] @ Save value of p->buf |
666 | add sp, sp, #8 @ Don't bother restoring r1, r2 | 670 | add sp, sp, #8 @ Don't bother restoring r1, r2 |
671 | #ifdef ROCKBOX | ||
672 | ldmpc regs=r4-r11 | ||
673 | #else | ||
667 | ldmia sp!, {r4 - r11, pc} | 674 | ldmia sp!, {r4 - r11, pc} |
675 | #endif | ||
668 | 676 | ||
669 | move_histm: | 677 | move_histm: |
670 | @ dest = r11 (p->historybuffer) | 678 | @ dest = r11 (p->historybuffer) |
diff --git a/apps/codecs/lib/mdct_arm.S b/apps/codecs/lib/mdct_arm.S index f2fa1d9c3e..515b859b44 100644 --- a/apps/codecs/lib/mdct_arm.S +++ b/apps/codecs/lib/mdct_arm.S | |||
@@ -127,7 +127,7 @@ mdct_butterfly_16: | |||
127 | @ mdct_butterfly_8 increments r0 by another #8*4 here | 127 | @ mdct_butterfly_8 increments r0 by another #8*4 here |
128 | @ at end, r0 has been incremented by #16*4 | 128 | @ at end, r0 has been incremented by #16*4 |
129 | 129 | ||
130 | ldr pc, [sp], #4 | 130 | ldrpc |
131 | 131 | ||
132 | mdct_butterfly_32: | 132 | mdct_butterfly_32: |
133 | stmdb sp!, {r4-r11, lr} | 133 | stmdb sp!, {r4-r11, lr} |
@@ -257,7 +257,7 @@ mdct_butterfly_32: | |||
257 | @ and we wanted to advance by #16*4 anyway, so just call again | 257 | @ and we wanted to advance by #16*4 anyway, so just call again |
258 | bl mdct_butterfly_16 | 258 | bl mdct_butterfly_16 |
259 | 259 | ||
260 | ldmia sp!, {r4-r11, pc} | 260 | ldmpc regs=r4-r11 |
261 | 261 | ||
262 | @ mdct_butterfly_generic_loop(x1, x2, T0, step, Ttop) | 262 | @ mdct_butterfly_generic_loop(x1, x2, T0, step, Ttop) |
263 | mdct_butterfly_generic_loop: | 263 | mdct_butterfly_generic_loop: |
@@ -433,5 +433,5 @@ mdct_butterfly_generic_loop: | |||
433 | cmp r2, r4 | 433 | cmp r2, r4 |
434 | bhi 1b | 434 | bhi 1b |
435 | 435 | ||
436 | ldmia sp!, {r4-r11, pc} | 436 | ldmpc regs=r4-r11 |
437 | 437 | ||
diff --git a/apps/codecs/libatrac/atrac3_arm.S b/apps/codecs/libatrac/atrac3_arm.S index 0908d582ed..80eaa7954d 100644 --- a/apps/codecs/libatrac/atrac3_arm.S +++ b/apps/codecs/libatrac/atrac3_arm.S | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | ||
23 | |||
22 | .section .text, "ax", %progbits | 24 | .section .text, "ax", %progbits |
23 | 25 | ||
24 | /**************************************************************************** | 26 | /**************************************************************************** |
@@ -63,7 +65,7 @@ atrac3_iqmf_matrixing: | |||
63 | subs r3, r3, #4 /* counter -= 4 */ | 65 | subs r3, r3, #4 /* counter -= 4 */ |
64 | bgt .iqmf_matrixing_loop | 66 | bgt .iqmf_matrixing_loop |
65 | 67 | ||
66 | ldmfd sp!, {r4-r9, pc} /* restore registers */ | 68 | ldmpc regs=r4-r9 /* restore registers */ |
67 | 69 | ||
68 | .atrac3_iqmf_matrixing_end: | 70 | .atrac3_iqmf_matrixing_end: |
69 | .size atrac3_iqmf_matrixing,.atrac3_iqmf_matrixing_end-atrac3_iqmf_matrixing | 71 | .size atrac3_iqmf_matrixing,.atrac3_iqmf_matrixing_end-atrac3_iqmf_matrixing |
@@ -218,7 +220,7 @@ atrac3_iqmf_dewindowing: | |||
218 | subs r3, r3, #1 /* outer loop -= 1 */ | 220 | subs r3, r3, #1 /* outer loop -= 1 */ |
219 | bgt .iqmf_dewindow_outer_loop | 221 | bgt .iqmf_dewindow_outer_loop |
220 | 222 | ||
221 | ldmfd sp!, {r4-r9, pc} /* restore registers */ | 223 | ldmpc regs=r4-r9 /* restore registers */ |
222 | 224 | ||
223 | .atrac3_iqmf_dewindowing_end: | 225 | .atrac3_iqmf_dewindowing_end: |
224 | .size atrac3_iqmf_dewindowing,.atrac3_iqmf_dewindowing_end-atrac3_iqmf_dewindowing | 226 | .size atrac3_iqmf_dewindowing,.atrac3_iqmf_dewindowing_end-atrac3_iqmf_dewindowing |
diff --git a/apps/codecs/libffmpegFLAC/arm.S b/apps/codecs/libffmpegFLAC/arm.S index 2a2746eefa..8adca77ce5 100644 --- a/apps/codecs/libffmpegFLAC/arm.S +++ b/apps/codecs/libffmpegFLAC/arm.S | |||
@@ -267,5 +267,5 @@ lpc_decode_arm: | |||
267 | bne .default @ no, prepare for next sample | 267 | bne .default @ no, prepare for next sample |
268 | 268 | ||
269 | .exit: | 269 | .exit: |
270 | ldmia sp!, { r4-r11, pc } | 270 | ldmpc regs=r4-r11 |
271 | 271 | ||
diff --git a/apps/codecs/libmad/dct32_arm.S b/apps/codecs/libmad/dct32_arm.S index a4eda8a087..440841bb5e 100644 --- a/apps/codecs/libmad/dct32_arm.S +++ b/apps/codecs/libmad/dct32_arm.S | |||
@@ -220,7 +220,7 @@ dct32: | |||
220 | cmp r0, #9 | 220 | cmp r0, #9 |
221 | bne .l4 | 221 | bne .l4 |
222 | add sp, sp, #144 | 222 | add sp, sp, #144 |
223 | ldmia sp!, {r4-r11, pc} | 223 | ldmpc regs=r4-r11 |
224 | bitrev: | 224 | bitrev: |
225 | .word 0x0 | 225 | .word 0x0 |
226 | .word 0x2 | 226 | .word 0x2 |
diff --git a/apps/codecs/libmad/imdct_l_arm.S b/apps/codecs/libmad/imdct_l_arm.S index b86ba1120d..b511ff169d 100644 --- a/apps/codecs/libmad/imdct_l_arm.S +++ b/apps/codecs/libmad/imdct_l_arm.S | |||
@@ -45,6 +45,7 @@ | |||
45 | * | 45 | * |
46 | ****************************************************************************/ | 46 | ****************************************************************************/ |
47 | 47 | ||
48 | #include "config.h" | ||
48 | 49 | ||
49 | /* | 50 | /* |
50 | On entry: | 51 | On entry: |
@@ -823,7 +824,7 @@ normal_block_x18_to_x35: | |||
823 | @---- | 824 | @---- |
824 | 825 | ||
825 | add sp, sp, #(21*4) @ return stack frame | 826 | add sp, sp, #(21*4) @ return stack frame |
826 | ldmia sp!, { r4 - r11, pc } @ restore callee saved regs, and return | 827 | ldmpc regs=r4-r11 @ restore callee saved regs, and return |
827 | 828 | ||
828 | @---- | 829 | @---- |
829 | 830 | ||
@@ -992,7 +993,7 @@ start_block_x18_to_x35: | |||
992 | @---- | 993 | @---- |
993 | 994 | ||
994 | add sp, sp, #(21*4) @ return stack frame | 995 | add sp, sp, #(21*4) @ return stack frame |
995 | ldmia sp!, { r4 - r11, pc } @ restore callee saved regs, and return | 996 | ldmpc regs=r4-r11 @ restore callee saved regs, and return |
996 | 997 | ||
997 | @---- | 998 | @---- |
998 | @END | 999 | @END |
diff --git a/apps/codecs/libmad/synth_full_arm.S b/apps/codecs/libmad/synth_full_arm.S index e663b8ffcb..dec437f666 100644 --- a/apps/codecs/libmad/synth_full_arm.S +++ b/apps/codecs/libmad/synth_full_arm.S | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | ||
22 | #include "mad_iram.h" | 23 | #include "mad_iram.h" |
23 | 24 | ||
24 | .section ICODE_SECTION_MPA_ARM,"ax",%progbits | 25 | .section ICODE_SECTION_MPA_ARM,"ax",%progbits |
@@ -135,7 +136,7 @@ synth_full_odd_sbsample: | |||
135 | 136 | ||
136 | ldr r5, =synth_full_sp | 137 | ldr r5, =synth_full_sp |
137 | ldr sp, [r5] | 138 | ldr sp, [r5] |
138 | ldmia sp!, {r4-r11, pc} | 139 | ldmpc regs=r4-r11 |
139 | 140 | ||
140 | synth_full_even_sbsample: | 141 | synth_full_even_sbsample: |
141 | stmdb sp!, {r4-r11, lr} | 142 | stmdb sp!, {r4-r11, lr} |
@@ -241,7 +242,7 @@ synth_full_even_sbsample: | |||
241 | 242 | ||
242 | ldr r5, =synth_full_sp | 243 | ldr r5, =synth_full_sp |
243 | ldr sp, [r5] | 244 | ldr sp, [r5] |
244 | ldmia sp!, {r4-r11, pc} | 245 | ldmpc regs=r4-r11 |
245 | 246 | ||
246 | .global III_aliasreduce | 247 | .global III_aliasreduce |
247 | 248 | ||
@@ -289,7 +290,7 @@ III_aliasreduce: | |||
289 | add r0, r0, #72 | 290 | add r0, r0, #72 |
290 | cmp r0, r1 | 291 | cmp r0, r1 |
291 | blo .arl1 | 292 | blo .arl1 |
292 | ldmia sp!, {r4-r11, pc} | 293 | ldmpc regs=r4-r11 |
293 | 294 | ||
294 | csa: | 295 | csa: |
295 | .word +0x0db84a81 | 296 | .word +0x0db84a81 |
@@ -332,7 +333,7 @@ III_overlap: | |||
332 | stmia r1!, {r4, r5, r6, r7, r12, lr} | 333 | stmia r1!, {r4, r5, r6, r7, r12, lr} |
333 | ldmia r0!, {r4, r5, r6, r7, r12, lr} | 334 | ldmia r0!, {r4, r5, r6, r7, r12, lr} |
334 | stmia r1!, {r4, r5, r6, r7, r12, lr} | 335 | stmia r1!, {r4, r5, r6, r7, r12, lr} |
335 | ldmia sp!, {r4-r7, pc} | 336 | ldmpc regs=r4-r7 |
336 | 337 | ||
337 | .section IBSS_SECTION_MPA_ARM,"aw",%nobits | 338 | .section IBSS_SECTION_MPA_ARM,"aw",%nobits |
338 | synth_full_sp: | 339 | synth_full_sp: |
diff --git a/apps/codecs/libmusepack/synth_filter_arm.S b/apps/codecs/libmusepack/synth_filter_arm.S index 3f78469948..731a21ce21 100644 --- a/apps/codecs/libmusepack/synth_filter_arm.S +++ b/apps/codecs/libmusepack/synth_filter_arm.S | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | ||
23 | |||
22 | .section .text, "ax", %progbits | 24 | .section .text, "ax", %progbits |
23 | 25 | ||
24 | /**************************************************************************** | 26 | /**************************************************************************** |
@@ -89,7 +91,7 @@ mpc_decoder_windowing_D: | |||
89 | subs lr, lr, #1 | 91 | subs lr, lr, #1 |
90 | bgt .loop32 | 92 | bgt .loop32 |
91 | 93 | ||
92 | ldmfd sp!, {r4-r8, pc} | 94 | ldmpc regs=r4-r8 |
93 | #else | 95 | #else |
94 | mpc_decoder_windowing_D: | 96 | mpc_decoder_windowing_D: |
95 | /* r0 = Data[] */ | 97 | /* r0 = Data[] */ |
@@ -287,7 +289,7 @@ mpc_decoder_windowing_D: | |||
287 | str r8, [r0], #4 /* store Data */ | 289 | str r8, [r0], #4 /* store Data */ |
288 | add r1, r1, #4 /* V++ */ | 290 | add r1, r1, #4 /* V++ */ |
289 | 291 | ||
290 | ldmfd sp!, {r4-r11, pc} | 292 | ldmpc regs=r4-r11 |
291 | #endif | 293 | #endif |
292 | .mpc_dewindowing_end: | 294 | .mpc_dewindowing_end: |
293 | .size mpc_decoder_windowing_D,.mpc_dewindowing_end-mpc_decoder_windowing_D | 295 | .size mpc_decoder_windowing_D,.mpc_dewindowing_end-mpc_decoder_windowing_D |
diff --git a/apps/codecs/libspeex/filters_arm4.S b/apps/codecs/libspeex/filters_arm4.S index 109556fa92..dcd1691982 100644 --- a/apps/codecs/libspeex/filters_arm4.S +++ b/apps/codecs/libspeex/filters_arm4.S | |||
@@ -49,7 +49,7 @@ iir_mem16: | |||
49 | beq .order_10 | 49 | beq .order_10 |
50 | cmp r5, #8 | 50 | cmp r5, #8 |
51 | beq .order_8 | 51 | beq .order_8 |
52 | ldmia sp!, { r4-r11, pc } @ Non-supported order, return | 52 | ldmpc regs=r4-r11 @ Non-supported order, return |
53 | 53 | ||
54 | @ TODO: try using direct form 1 filtering | 54 | @ TODO: try using direct form 1 filtering |
55 | .order_8: | 55 | .order_8: |
@@ -94,7 +94,7 @@ iir_mem16: | |||
94 | bne 0b | 94 | bne 0b |
95 | ldr r4, [sp, #40] @ r4 = mem | 95 | ldr r4, [sp, #40] @ r4 = mem |
96 | stmia r4, { r5-r12 } @ Save back mem[] | 96 | stmia r4, { r5-r12 } @ Save back mem[] |
97 | ldmia sp!, { r4-r11, pc } @ Exit | 97 | ldmpc regs=r4-r11 @ Exit |
98 | 98 | ||
99 | .order_10: | 99 | .order_10: |
100 | ldmia r4, { r5-r9 } @ r5-r9 = mem[0..4] | 100 | ldmia r4, { r5-r9 } @ r5-r9 = mem[0..4] |
@@ -154,7 +154,7 @@ iir_mem16: | |||
154 | sub r1, r1, #10*2 | 154 | sub r1, r1, #10*2 |
155 | subs r3, r3, #1 | 155 | subs r3, r3, #1 |
156 | bne .order_10 | 156 | bne .order_10 |
157 | ldmia sp!, { r4-r11, pc } @ Exit | 157 | ldmpc regs=r4-r11 @ Exit |
158 | 158 | ||
159 | 159 | ||
160 | /* void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_t *a, spx_word16_t *y, int N, int M, spx_word32_t *mem1, spx_word32_t *mem2, char *stack) */ | 160 | /* void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_t *a, spx_word16_t *y, int N, int M, spx_word32_t *mem1, spx_word32_t *mem2, char *stack) */ |
@@ -300,7 +300,7 @@ qmf_synth: | |||
300 | strh r8, [r6], #4 | 300 | strh r8, [r6], #4 |
301 | subs r4, r4, #4 | 301 | subs r4, r4, #4 |
302 | bne 0b | 302 | bne 0b |
303 | ldmia sp!, { r4-r11, pc } @ Exit | 303 | ldmpc regs=r4-r11 @ Exit |
304 | 304 | ||
305 | 305 | ||
306 | /* void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len) */ | 306 | /* void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len) */ |
@@ -325,5 +325,5 @@ signal_mul: | |||
325 | subs r3, r3, #4 @ Are we done? | 325 | subs r3, r3, #4 @ Are we done? |
326 | bne 0b | 326 | bne 0b |
327 | 327 | ||
328 | ldmia sp!, { r4-r8, pc } @ Exit | 328 | ldmpc regs=r4-r8 @ Exit |
329 | 329 | ||
diff --git a/apps/codecs/libtta/filter_arm.S b/apps/codecs/libtta/filter_arm.S index d34b182a04..f3959b83ca 100644 --- a/apps/codecs/libtta/filter_arm.S +++ b/apps/codecs/libtta/filter_arm.S | |||
@@ -167,7 +167,7 @@ hybrid_filter: | |||
167 | @ set to the memory: *pA, *(pA-1), *(pA-2), *(pA-3), *pM, *(pM-1), *(pM-2), *(pM-3) | 167 | @ set to the memory: *pA, *(pA-1), *(pA-2), *(pA-3), *pM, *(pM-1), *(pM-2), *(pM-3) |
168 | stmneda r2, {r10, r11, r12, lr} | 168 | stmneda r2, {r10, r11, r12, lr} |
169 | stmneda r3, {r5, r6, r7, r8} | 169 | stmneda r3, {r5, r6, r7, r8} |
170 | ldmnefd sp!, {r4-r12, pc} @ hybrid_filter end (when fs->index != 0) | 170 | ldmpc cond=ne regs=r4-r12 @ hybrid_filter end (when fs->index != 0) |
171 | 171 | ||
172 | .hf_memshl: | 172 | .hf_memshl: |
173 | @ memshl (fs->dl) | 173 | @ memshl (fs->dl) |
@@ -192,7 +192,7 @@ hybrid_filter: | |||
192 | ldmia r9, {r1, r2, r3, r4} | 192 | ldmia r9, {r1, r2, r3, r4} |
193 | sub r9, r9, #64 @ r9 = fs->dx | 193 | sub r9, r9, #64 @ r9 = fs->dx |
194 | stmia r9, {r1 - r8} | 194 | stmia r9, {r1 - r8} |
195 | ldmfd sp!, {r4 - r12, pc} @ hybrid_filter end (when fs->index == 0) | 195 | ldmpc regs=r4-r12 @ hybrid_filter end (when fs->index == 0) |
196 | 196 | ||
197 | hybrid_filter_end: | 197 | hybrid_filter_end: |
198 | .size hybrid_filter, hybrid_filter_end - hybrid_filter | 198 | .size hybrid_filter, hybrid_filter_end - hybrid_filter |
diff --git a/apps/codecs/libwavpack/arm.S b/apps/codecs/libwavpack/arm.S index 90dfd46c6e..32de1df7de 100644 --- a/apps/codecs/libwavpack/arm.S +++ b/apps/codecs/libwavpack/arm.S | |||
@@ -35,6 +35,9 @@ | |||
35 | * 32-bit multiply-accumulate instruction and so will overflow with 24-bit | 35 | * 32-bit multiply-accumulate instruction and so will overflow with 24-bit |
36 | * WavPack files. | 36 | * WavPack files. |
37 | */ | 37 | */ |
38 | |||
39 | #include "config.h" | ||
40 | |||
38 | .text | 41 | .text |
39 | .align | 42 | .align |
40 | .global decorr_stereo_pass_cont_arm | 43 | .global decorr_stereo_pass_cont_arm |
@@ -470,5 +473,5 @@ term_minus_3_loop: | |||
470 | common_exit: | 473 | common_exit: |
471 | strh r4, [r5, #4] | 474 | strh r4, [r5, #4] |
472 | strh r0, [r5, #6] | 475 | strh r0, [r5, #6] |
473 | ldmfd sp!, {r4 - r8, r10, r11, pc} | 476 | ldmpc regs="r4-r8, r10-r11" |
474 | 477 | ||
diff --git a/apps/codecs/libwavpack/arml.S b/apps/codecs/libwavpack/arml.S index 5745c81ed0..60818aa1e6 100644 --- a/apps/codecs/libwavpack/arml.S +++ b/apps/codecs/libwavpack/arml.S | |||
@@ -38,6 +38,8 @@ | |||
38 | * instruction. | 38 | * instruction. |
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "config.h" | ||
42 | |||
41 | .text | 43 | .text |
42 | .align | 44 | .align |
43 | .global decorr_stereo_pass_cont_arml | 45 | .global decorr_stereo_pass_cont_arml |
@@ -500,5 +502,5 @@ common_exit: | |||
500 | mov r4, r4, asr #18 | 502 | mov r4, r4, asr #18 |
501 | strh r4, [r5, #4] | 503 | strh r4, [r5, #4] |
502 | strh r0, [r5, #6] | 504 | strh r0, [r5, #6] |
503 | ldmfd sp!, {r4 - r8, r10, r11, pc} | 505 | ldmpc regs="r4-r8, r10-r11" |
504 | 506 | ||
diff --git a/apps/dsp_arm.S b/apps/dsp_arm.S index 2150ff0631..7e360749a3 100644 --- a/apps/dsp_arm.S +++ b/apps/dsp_arm.S | |||
@@ -23,6 +23,9 @@ | |||
23 | /**************************************************************************** | 23 | /**************************************************************************** |
24 | * void channels_process_sound_chan_mono(int count, int32_t *buf[]) | 24 | * void channels_process_sound_chan_mono(int count, int32_t *buf[]) |
25 | */ | 25 | */ |
26 | |||
27 | #include "config.h" | ||
28 | |||
26 | .section .icode, "ax", %progbits | 29 | .section .icode, "ax", %progbits |
27 | .align 2 | 30 | .align 2 |
28 | .global channels_process_sound_chan_mono | 31 | .global channels_process_sound_chan_mono |
@@ -47,7 +50,7 @@ channels_process_sound_chan_mono: | |||
47 | stmia r2!, { r12, r14 } @ store Mo0, Mo1 | 50 | stmia r2!, { r12, r14 } @ store Mo0, Mo1 |
48 | bgt .monoloop @ | 51 | bgt .monoloop @ |
49 | @ | 52 | @ |
50 | ldmltfd sp!, { r4, pc } @ if count was even, we're done | 53 | ldmpc cond=lt, regs=r4 @ if count was even, we're done |
51 | @ | 54 | @ |
52 | .mono_singlesample: @ | 55 | .mono_singlesample: @ |
53 | ldr r3, [r1] @ r3 = Ls | 56 | ldr r3, [r1] @ r3 = Ls |
@@ -57,7 +60,7 @@ channels_process_sound_chan_mono: | |||
57 | str r12, [r1] @ store Mo | 60 | str r12, [r1] @ store Mo |
58 | str r12, [r2] @ store Mo | 61 | str r12, [r2] @ store Mo |
59 | @ | 62 | @ |
60 | ldmfd sp!, { r4, pc } @ | 63 | ldmpc regs=r4 @ |
61 | .size channels_process_sound_chan_mono, \ | 64 | .size channels_process_sound_chan_mono, \ |
62 | .-channels_process_sound_chan_mono | 65 | .-channels_process_sound_chan_mono |
63 | 66 | ||
@@ -112,7 +115,7 @@ channels_process_sound_chan_custom: | |||
112 | 115 | ||
113 | bgt .custom_loop | 116 | bgt .custom_loop |
114 | 117 | ||
115 | ldmltfd sp!, { r4-r10, pc } @ < 0? even count | 118 | ldmpc cond=lt, regs=r4-r10 @ < 0? even count |
116 | 119 | ||
117 | .custom_single_sample: | 120 | .custom_single_sample: |
118 | ldr r5, [r1] @ handle odd sample | 121 | ldr r5, [r1] @ handle odd sample |
@@ -131,7 +134,7 @@ channels_process_sound_chan_custom: | |||
131 | str r5, [r1] @ Store Lc0 | 134 | str r5, [r1] @ Store Lc0 |
132 | str r7, [r2] @ Store Rc0 | 135 | str r7, [r2] @ Store Rc0 |
133 | 136 | ||
134 | ldmfd sp!, { r4-r10, pc } | 137 | ldmpc regs=r4-r10 |
135 | .size channels_process_sound_chan_custom, \ | 138 | .size channels_process_sound_chan_custom, \ |
136 | .-channels_process_sound_chan_custom | 139 | .-channels_process_sound_chan_custom |
137 | 140 | ||
@@ -164,7 +167,7 @@ channels_process_sound_chan_karaoke: | |||
164 | stmia r2!, { r12, r14 } @ store Ro0, Ro1 | 167 | stmia r2!, { r12, r14 } @ store Ro0, Ro1 |
165 | bgt .karaokeloop @ | 168 | bgt .karaokeloop @ |
166 | @ | 169 | @ |
167 | ldmltfd sp!, { r4, pc } @ if count was even, we're done | 170 | ldmpc cond=lt, regs=r4 @ if count was even, we're done |
168 | @ | 171 | @ |
169 | .karaoke_singlesample: @ | 172 | .karaoke_singlesample: @ |
170 | ldr r3, [r1] @ r3 = Li | 173 | ldr r3, [r1] @ r3 = Li |
@@ -175,7 +178,7 @@ channels_process_sound_chan_karaoke: | |||
175 | str r3, [r1] @ store Lo | 178 | str r3, [r1] @ store Lo |
176 | str r12, [r2] @ store Ro | 179 | str r12, [r2] @ store Ro |
177 | @ | 180 | @ |
178 | ldmfd sp!, { r4, pc } @ | 181 | ldmpc regs=r4 @ |
179 | .size channels_process_sound_chan_karaoke, \ | 182 | .size channels_process_sound_chan_karaoke, \ |
180 | .-channels_process_sound_chan_karaoke | 183 | .-channels_process_sound_chan_karaoke |
181 | 184 | ||
@@ -225,7 +228,7 @@ sample_output_mono: | |||
225 | subs r0, r0, #2 | 228 | subs r0, r0, #2 |
226 | bgt .somloop | 229 | bgt .somloop |
227 | 230 | ||
228 | ldmltfd sp!, { r4-r6, pc } @ even 'count'? return | 231 | ldmpc cond=lt, regs=r4-r6 @ even 'count'? return |
229 | 232 | ||
230 | .som_singlesample: | 233 | .som_singlesample: |
231 | ldr r5, [r2] @ do odd sample | 234 | ldr r5, [r2] @ do odd sample |
@@ -239,7 +242,7 @@ sample_output_mono: | |||
239 | orr r5, r5, r5, lsl #16 | 242 | orr r5, r5, r5, lsl #16 |
240 | str r5, [r3] | 243 | str r5, [r3] |
241 | 244 | ||
242 | ldmfd sp!, { r4-r6, pc } | 245 | ldmpc regs=r4-r6 |
243 | .size sample_output_mono, .-sample_output_mono | 246 | .size sample_output_mono, .-sample_output_mono |
244 | 247 | ||
245 | /**************************************************************************** | 248 | /**************************************************************************** |
@@ -302,7 +305,7 @@ sample_output_stereo: | |||
302 | subs r0, r0, #2 | 305 | subs r0, r0, #2 |
303 | bgt .sosloop | 306 | bgt .sosloop |
304 | 307 | ||
305 | ldmltfd sp!, { r4-r9, pc } @ even 'count'? return | 308 | ldmpc cond=lt, regs=r4-r9 @ even 'count'? return |
306 | 309 | ||
307 | .sos_singlesample: | 310 | .sos_singlesample: |
308 | ldr r6, [r2] @ left odd sample | 311 | ldr r6, [r2] @ left odd sample |
@@ -324,7 +327,7 @@ sample_output_stereo: | |||
324 | 327 | ||
325 | str r8, [r3] | 328 | str r8, [r3] |
326 | 329 | ||
327 | ldmfd sp!, { r4-r9, pc } | 330 | ldmpc regs=r4-r9 |
328 | .size sample_output_stereo, .-sample_output_stereo | 331 | .size sample_output_stereo, .-sample_output_stereo |
329 | #endif /* ARM_ARCH < 6 */ | 332 | #endif /* ARM_ARCH < 6 */ |
330 | 333 | ||
@@ -387,7 +390,7 @@ apply_crossfeed: | |||
387 | stmia r12, { r8-r11 } @ save filter history | 390 | stmia r12, { r8-r11 } @ save filter history |
388 | str r0, [r12, #30*4] @ save delay line index | 391 | str r0, [r12, #30*4] @ save delay line index |
389 | add sp, sp, #8 @ remove temp variables from stack | 392 | add sp, sp, #8 @ remove temp variables from stack |
390 | ldmia sp!, { r4-r11, pc } | 393 | ldmpc regs=r4-r11 |
391 | .size apply_crossfeed, .-apply_crossfeed | 394 | .size apply_crossfeed, .-apply_crossfeed |
392 | 395 | ||
393 | /**************************************************************************** | 396 | /**************************************************************************** |
@@ -444,7 +447,7 @@ dsp_downsample: | |||
444 | ldr r1, [r3] @ r1 = &dst[0] | 447 | ldr r1, [r3] @ r1 = &dst[0] |
445 | sub r8, r8, r1 @ dst - &dst[0] | 448 | sub r8, r8, r1 @ dst - &dst[0] |
446 | mov r0, r8, lsr #2 @ convert bytes->samples | 449 | mov r0, r8, lsr #2 @ convert bytes->samples |
447 | ldmia sp!, { r4-r11, pc } @ ... and we're out | 450 | ldmpc regs=r4-r11 @ ... and we're out |
448 | .size dsp_downsample, .-dsp_downsample | 451 | .size dsp_downsample, .-dsp_downsample |
449 | 452 | ||
450 | /**************************************************************************** | 453 | /**************************************************************************** |
@@ -507,7 +510,7 @@ dsp_upsample: | |||
507 | sub r8, r8, r2 @ dst - &dst[0] | 510 | sub r8, r8, r2 @ dst - &dst[0] |
508 | mov r0, r8, lsr #2 @ convert bytes->samples | 511 | mov r0, r8, lsr #2 @ convert bytes->samples |
509 | add sp, sp, #8 @ adjust stack for temp variables | 512 | add sp, sp, #8 @ adjust stack for temp variables |
510 | ldmfd sp!, { r4-r11, pc } @ ... and we're out | 513 | ldmpc regs=r4-r11 @ ... and we're out |
511 | .size dsp_upsample, .-dsp_upsample | 514 | .size dsp_upsample, .-dsp_upsample |
512 | 515 | ||
513 | /**************************************************************************** | 516 | /**************************************************************************** |
@@ -554,5 +557,5 @@ dsp_apply_gain: | |||
554 | subs r3, r3, #1 | 557 | subs r3, r3, #1 |
555 | bgt .dag_outerloop @ end of outer loop | 558 | bgt .dag_outerloop @ end of outer loop |
556 | 559 | ||
557 | ldmfd sp!, { r4-r8, pc } | 560 | ldmpc regs=r4-r8 |
558 | .size dsp_apply_gain, .-dsp_apply_gain | 561 | .size dsp_apply_gain, .-dsp_apply_gain |
diff --git a/apps/eq_arm.S b/apps/eq_arm.S index 92446e3798..ca6ceec1db 100644 --- a/apps/eq_arm.S +++ b/apps/eq_arm.S | |||
@@ -85,5 +85,5 @@ eq_filter: | |||
85 | bne .filterloop | 85 | bne .filterloop |
86 | 86 | ||
87 | add sp, sp, #16 @ compensate for temp storage | 87 | add sp, sp, #16 @ compensate for temp storage |
88 | ldmia sp!, { r4-r11, pc } | 88 | ldmpc regs=r4-r11 |
89 | 89 | ||
diff --git a/apps/plugins/mpegplayer/idct_arm.S b/apps/plugins/mpegplayer/idct_arm.S index 7253d890bf..97a87a8b59 100644 --- a/apps/plugins/mpegplayer/idct_arm.S +++ b/apps/plugins/mpegplayer/idct_arm.S | |||
@@ -19,6 +19,8 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | ||
23 | |||
22 | .global mpeg2_idct_copy | 24 | .global mpeg2_idct_copy |
23 | .type mpeg2_idct_copy, %function | 25 | .type mpeg2_idct_copy, %function |
24 | .global mpeg2_idct_add | 26 | .global mpeg2_idct_add |
@@ -313,7 +315,7 @@ mpeg2_idct_copy: | |||
313 | add r1, r1, r2 | 315 | add r1, r1, r2 |
314 | cmp r0, r12 | 316 | cmp r0, r12 |
315 | blo 1b | 317 | blo 1b |
316 | ldmfd sp!, { r4-r11, pc } | 318 | ldmpc regs=r4-r11 |
317 | 319 | ||
318 | mpeg2_idct_add: | 320 | mpeg2_idct_add: |
319 | cmp r0, #129 | 321 | cmp r0, #129 |
@@ -385,7 +387,7 @@ mpeg2_idct_add: | |||
385 | add r1, r1, r2 | 387 | add r1, r1, r2 |
386 | cmp r0, r12 | 388 | cmp r0, r12 |
387 | blo 2b | 389 | blo 2b |
388 | ldmfd sp!, { r4-r11, pc } | 390 | ldmpc regs=r4-r11 |
389 | 3: | 391 | 3: |
390 | stmfd sp!, { r4-r5, lr } | 392 | stmfd sp!, { r4-r5, lr } |
391 | ldrsh r1, [r0, #0] /* r1 = block[0] */ | 393 | ldrsh r1, [r0, #0] /* r1 = block[0] */ |
@@ -438,4 +440,4 @@ mpeg2_idct_add: | |||
438 | add r2, r2, r3 | 440 | add r2, r2, r3 |
439 | cmp r2, r0 | 441 | cmp r2, r0 |
440 | blo 4b | 442 | blo 4b |
441 | ldmfd sp!, { r4-r5, pc } | 443 | ldmpc regs=r4-r5 |
diff --git a/apps/plugins/mpegplayer/motion_comp_arm_s.S b/apps/plugins/mpegplayer/motion_comp_arm_s.S index fb29d59e99..49628c6ad5 100644 --- a/apps/plugins/mpegplayer/motion_comp_arm_s.S +++ b/apps/plugins/mpegplayer/motion_comp_arm_s.S | |||
@@ -47,7 +47,7 @@ MC_put_o_16_align0: | |||
47 | subs r3, r3, #1 | 47 | subs r3, r3, #1 |
48 | add r0, r0, r2 | 48 | add r0, r0, r2 |
49 | bne MC_put_o_16_align0 | 49 | bne MC_put_o_16_align0 |
50 | ldmfd sp!, {r4-r7, pc} @@ update PC with LR content. | 50 | ldmpc regs=r4-r7 @@ update PC with LR content. |
51 | 51 | ||
52 | .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4 | 52 | .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4 |
53 | mov \R0, \R0, lsr #(\shift) | 53 | mov \R0, \R0, lsr #(\shift) |
@@ -71,7 +71,7 @@ MC_put_o_16_align1: | |||
71 | subs r3, r3, #1 | 71 | subs r3, r3, #1 |
72 | add r0, r0, r2 | 72 | add r0, r0, r2 |
73 | bne 1b | 73 | bne 1b |
74 | ldmfd sp!, {r4-r7, pc} @@ update PC with LR content. | 74 | ldmpc regs=r4-r7 @@ update PC with LR content. |
75 | 75 | ||
76 | MC_put_o_16_align2: | 76 | MC_put_o_16_align2: |
77 | and r1, r1, #0xFFFFFFFC | 77 | and r1, r1, #0xFFFFFFFC |
@@ -83,7 +83,7 @@ MC_put_o_16_align2: | |||
83 | subs r3, r3, #1 | 83 | subs r3, r3, #1 |
84 | add r0, r0, r2 | 84 | add r0, r0, r2 |
85 | bne 1b | 85 | bne 1b |
86 | ldmfd sp!, {r4-r7, pc} @@ update PC with LR content. | 86 | ldmpc regs=r4-r7 @@ update PC with LR content. |
87 | 87 | ||
88 | MC_put_o_16_align3: | 88 | MC_put_o_16_align3: |
89 | and r1, r1, #0xFFFFFFFC | 89 | and r1, r1, #0xFFFFFFFC |
@@ -95,7 +95,7 @@ MC_put_o_16_align3: | |||
95 | subs r3, r3, #1 | 95 | subs r3, r3, #1 |
96 | add r0, r0, r2 | 96 | add r0, r0, r2 |
97 | bne 1b | 97 | bne 1b |
98 | ldmfd sp!, {r4-r7, pc} @@ update PC with LR content. | 98 | ldmpc regs=r4-r7 @@ update PC with LR content. |
99 | 99 | ||
100 | @ ---------------------------------------------------------------- | 100 | @ ---------------------------------------------------------------- |
101 | .align | 101 | .align |
@@ -120,7 +120,7 @@ MC_put_o_8_align0: | |||
120 | add r0, r0, r2 | 120 | add r0, r0, r2 |
121 | subs r3, r3, #1 | 121 | subs r3, r3, #1 |
122 | bne MC_put_o_8_align0 | 122 | bne MC_put_o_8_align0 |
123 | ldmfd sp!, {r4, r5, pc} @@ update PC with LR content. | 123 | ldmpc regs=r4-r5 @@ update PC with LR content. |
124 | 124 | ||
125 | .macro ADJ_ALIGN_DW shift, R0, R1, R2 | 125 | .macro ADJ_ALIGN_DW shift, R0, R1, R2 |
126 | mov \R0, \R0, lsr #(\shift) | 126 | mov \R0, \R0, lsr #(\shift) |
@@ -140,7 +140,7 @@ MC_put_o_8_align1: | |||
140 | subs r3, r3, #1 | 140 | subs r3, r3, #1 |
141 | add r0, r0, r2 | 141 | add r0, r0, r2 |
142 | bne 1b | 142 | bne 1b |
143 | ldmfd sp!, {r4, r5, pc} @@ update PC with LR content. | 143 | ldmpc regs=r4-r5 @@ update PC with LR content. |
144 | 144 | ||
145 | MC_put_o_8_align2: | 145 | MC_put_o_8_align2: |
146 | and r1, r1, #0xFFFFFFFC | 146 | and r1, r1, #0xFFFFFFFC |
@@ -152,7 +152,7 @@ MC_put_o_8_align2: | |||
152 | subs r3, r3, #1 | 152 | subs r3, r3, #1 |
153 | add r0, r0, r2 | 153 | add r0, r0, r2 |
154 | bne 1b | 154 | bne 1b |
155 | ldmfd sp!, {r4, r5, pc} @@ update PC with LR content. | 155 | ldmpc regs=r4-r5 @@ update PC with LR content. |
156 | 156 | ||
157 | MC_put_o_8_align3: | 157 | MC_put_o_8_align3: |
158 | and r1, r1, #0xFFFFFFFC | 158 | and r1, r1, #0xFFFFFFFC |
@@ -164,7 +164,7 @@ MC_put_o_8_align3: | |||
164 | subs r3, r3, #1 | 164 | subs r3, r3, #1 |
165 | add r0, r0, r2 | 165 | add r0, r0, r2 |
166 | bne 1b | 166 | bne 1b |
167 | ldmfd sp!, {r4, r5, pc} @@ update PC with LR content. | 167 | ldmpc regs=r4-r5 @@ update PC with LR content. |
168 | 168 | ||
169 | @ ---------------------------------------------------------------- | 169 | @ ---------------------------------------------------------------- |
170 | .macro AVG_PW rW1, rW2 | 170 | .macro AVG_PW rW1, rW2 |
@@ -218,7 +218,7 @@ MC_put_x_16_align0: | |||
218 | subs r3, r3, #1 | 218 | subs r3, r3, #1 |
219 | add r0, r0, r2 | 219 | add r0, r0, r2 |
220 | bne MC_put_x_16_align0 | 220 | bne MC_put_x_16_align0 |
221 | ldmfd sp!, {r4-r8, HIGH_REGS, pc} @@ update PC with LR content. | 221 | ldmpc regs="r4-r8, HIGH_REGS" @@ update PC with LR content. |
222 | 222 | ||
223 | MC_put_x_16_align1: | 223 | MC_put_x_16_align1: |
224 | and r1, r1, #0xFFFFFFFC | 224 | and r1, r1, #0xFFFFFFFC |
@@ -234,7 +234,7 @@ MC_put_x_16_align1: | |||
234 | subs r3, r3, #1 | 234 | subs r3, r3, #1 |
235 | add r0, r0, r2 | 235 | add r0, r0, r2 |
236 | bne 1b | 236 | bne 1b |
237 | ldmfd sp!, {r4-r8, HIGH_REGS, pc} @@ update PC with LR content. | 237 | ldmpc regs="r4-r8, HIGH_REGS" @@ update PC with LR content. |
238 | 238 | ||
239 | MC_put_x_16_align2: | 239 | MC_put_x_16_align2: |
240 | and r1, r1, #0xFFFFFFFC | 240 | and r1, r1, #0xFFFFFFFC |
@@ -250,7 +250,7 @@ MC_put_x_16_align2: | |||
250 | subs r3, r3, #1 | 250 | subs r3, r3, #1 |
251 | add r0, r0, r2 | 251 | add r0, r0, r2 |
252 | bne 1b | 252 | bne 1b |
253 | ldmfd sp!, {r4-r8, HIGH_REGS, pc} @@ update PC with LR content. | 253 | ldmpc regs="r4-r8, HIGH_REGS" @@ update PC with LR content. |
254 | 254 | ||
255 | MC_put_x_16_align3: | 255 | MC_put_x_16_align3: |
256 | and r1, r1, #0xFFFFFFFC | 256 | and r1, r1, #0xFFFFFFFC |
@@ -266,7 +266,7 @@ MC_put_x_16_align3: | |||
266 | subs r3, r3, #1 | 266 | subs r3, r3, #1 |
267 | add r0, r0, r2 | 267 | add r0, r0, r2 |
268 | bne 1b | 268 | bne 1b |
269 | ldmfd sp!, {r4-r8, HIGH_REGS, pc} @@ update PC with LR content. | 269 | ldmpc regs="r4-r8, HIGH_REGS" @@ update PC with LR content. |
270 | 270 | ||
271 | @ ---------------------------------------------------------------- | 271 | @ ---------------------------------------------------------------- |
272 | .align | 272 | .align |
@@ -297,7 +297,7 @@ MC_put_x_8_align0: | |||
297 | subs r3, r3, #1 | 297 | subs r3, r3, #1 |
298 | add r0, r0, r2 | 298 | add r0, r0, r2 |
299 | bne MC_put_x_8_align0 | 299 | bne MC_put_x_8_align0 |
300 | ldmfd sp!, {r4-r6, HIGH_REGS, pc} @@ update PC with LR content. | 300 | ldmpc regs="r4-r6, HIGH_REGS" @@ update PC with LR content. |
301 | 301 | ||
302 | MC_put_x_8_align1: | 302 | MC_put_x_8_align1: |
303 | and r1, r1, #0xFFFFFFFC | 303 | and r1, r1, #0xFFFFFFFC |
@@ -311,7 +311,7 @@ MC_put_x_8_align1: | |||
311 | subs r3, r3, #1 | 311 | subs r3, r3, #1 |
312 | add r0, r0, r2 | 312 | add r0, r0, r2 |
313 | bne 1b | 313 | bne 1b |
314 | ldmfd sp!, {r4-r6, HIGH_REGS, pc} @@ update PC with LR content. | 314 | ldmpc regs="r4-r6, HIGH_REGS" @@ update PC with LR content. |
315 | 315 | ||
316 | MC_put_x_8_align2: | 316 | MC_put_x_8_align2: |
317 | and r1, r1, #0xFFFFFFFC | 317 | and r1, r1, #0xFFFFFFFC |
@@ -325,7 +325,7 @@ MC_put_x_8_align2: | |||
325 | subs r3, r3, #1 | 325 | subs r3, r3, #1 |
326 | add r0, r0, r2 | 326 | add r0, r0, r2 |
327 | bne 1b | 327 | bne 1b |
328 | ldmfd sp!, {r4-r6, HIGH_REGS, pc} @@ update PC with LR content. | 328 | ldmpc regs="r4-r6, HIGH_REGS" @@ update PC with LR content. |
329 | 329 | ||
330 | MC_put_x_8_align3: | 330 | MC_put_x_8_align3: |
331 | and r1, r1, #0xFFFFFFFC | 331 | and r1, r1, #0xFFFFFFFC |
@@ -339,4 +339,4 @@ MC_put_x_8_align3: | |||
339 | subs r3, r3, #1 | 339 | subs r3, r3, #1 |
340 | add r0, r0, r2 | 340 | add r0, r0, r2 |
341 | bne 1b | 341 | bne 1b |
342 | ldmfd sp!, {r4-r6, HIGH_REGS, pc} @@ update PC with LR content. | 342 | ldmpc regs="r4-r6, HIGH_REGS @@ update PC with LR content. |
diff --git a/apps/plugins/pacbox/pacbox_arm.S b/apps/plugins/pacbox/pacbox_arm.S index 32cf2d447e..87696ce6f7 100644 --- a/apps/plugins/pacbox/pacbox_arm.S +++ b/apps/plugins/pacbox/pacbox_arm.S | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | ||
22 | #include "pacbox.h" | 23 | #include "pacbox.h" |
23 | 24 | ||
24 | .section .icode,"ax",%progbits | 25 | .section .icode,"ax",%progbits |
@@ -120,7 +121,7 @@ loop_x: | |||
120 | /* end of y loop */ | 121 | /* end of y loop */ |
121 | add r1, r1, #224*3 @ vbuf += 224*3 | 122 | add r1, r1, #224*3 @ vbuf += 224*3 |
122 | subs lr, lr, #4 @ y-=4 | 123 | subs lr, lr, #4 @ y-=4 |
123 | ldmeqia sp!, {r4-r11, pc} | 124 | ldmpc cond=eq, regs=r4-r11 |
124 | b loop_y | 125 | b loop_y |
125 | #endif | 126 | #endif |
126 | #endif | 127 | #endif |
diff --git a/apps/recorder/jpeg_idct_arm.S b/apps/recorder/jpeg_idct_arm.S index 4739600a81..e7eb4b87f1 100644 --- a/apps/recorder/jpeg_idct_arm.S +++ b/apps/recorder/jpeg_idct_arm.S | |||
@@ -89,7 +89,7 @@ jpeg_idct2v: | |||
89 | add r0, r0, #4 | 89 | add r0, r0, #4 |
90 | cmp r0, r1 | 90 | cmp r0, r1 |
91 | bcc 1b | 91 | bcc 1b |
92 | ldmia sp!, { r4, pc } | 92 | ldmpc regs=r4 |
93 | #else | 93 | #else |
94 | /* ARMv6 offers partitioned adds and subtracts, used here to unroll the loop | 94 | /* ARMv6 offers partitioned adds and subtracts, used here to unroll the loop |
95 | to two columns. | 95 | to two columns. |
@@ -137,7 +137,7 @@ jpeg_idct2h: | |||
137 | add r1, r1, r3 | 137 | add r1, r1, r3 |
138 | cmp r0, r2 | 138 | cmp r0, r2 |
139 | bcc 1b | 139 | bcc 1b |
140 | ldmia sp!, { r4-r5, pc } | 140 | ldmpc regs=r4-r5 |
141 | #else | 141 | #else |
142 | stmdb sp!, { r4, lr } | 142 | stmdb sp!, { r4, lr } |
143 | ldrsh r14, .Lpool4+2 | 143 | ldrsh r14, .Lpool4+2 |
@@ -190,7 +190,7 @@ jpeg_idct4v: | |||
190 | add r0, r0, #2 | 190 | add r0, r0, #2 |
191 | cmp r0, r1 | 191 | cmp r0, r1 |
192 | bcc 1b | 192 | bcc 1b |
193 | ldmia sp!, { r4-r7, pc } | 193 | ldmpc regs=r4-r7 |
194 | #elif ARM_ARCH < 6 | 194 | #elif ARM_ARCH < 6 |
195 | stmdb sp!, { r4-r8, lr } | 195 | stmdb sp!, { r4-r8, lr } |
196 | mov r8, #1024 | 196 | mov r8, #1024 |
@@ -221,7 +221,7 @@ jpeg_idct4v: | |||
221 | cmp r0, r1 | 221 | cmp r0, r1 |
222 | bcc 1b | 222 | bcc 1b |
223 | ldmia sp!, { r4-r8, pc } | 223 | ldmia sp!, { r4-r8, pc } |
224 | #else | 224 | #else /* ARMv6+ */ |
225 | stmdb sp!, { r4-r10, lr } | 225 | stmdb sp!, { r4-r10, lr } |
226 | ldrd r2, .Lpool4 | 226 | ldrd r2, .Lpool4 |
227 | mov r12, #1024 | 227 | mov r12, #1024 |
@@ -325,8 +325,8 @@ jpeg_idct4h: | |||
325 | add r1, r1, r3 | 325 | add r1, r1, r3 |
326 | cmp r0, r2 | 326 | cmp r0, r2 |
327 | bcc 1b | 327 | bcc 1b |
328 | ldmia sp!, { r4-r10, pc } | 328 | ldmpc regs=r4-r10 |
329 | #elif ARM_ARCH < 6 | 329 | #elif ARM_ARCH < 6 /* ARMv5 */ |
330 | stmdb sp!, { r4-r9, lr } | 330 | stmdb sp!, { r4-r9, lr } |
331 | ldr r4, .Lpool4 | 331 | ldr r4, .Lpool4 |
332 | ldr r5, .Lpool4+4 | 332 | ldr r5, .Lpool4+4 |
@@ -367,7 +367,7 @@ jpeg_idct4h: | |||
367 | cmp r0, r2 | 367 | cmp r0, r2 |
368 | bcc 1b | 368 | bcc 1b |
369 | ldmia sp!, { r4-r9, pc } | 369 | ldmia sp!, { r4-r9, pc } |
370 | #else | 370 | #else /* ARMv6+ */ |
371 | stmdb sp!, { r4-r9, lr } | 371 | stmdb sp!, { r4-r9, lr } |
372 | ldrd r4, .Lpool4 | 372 | ldrd r4, .Lpool4 |
373 | mov r9, r4, lsr #16 | 373 | mov r9, r4, lsr #16 |
@@ -424,7 +424,7 @@ jpeg_idct8v: | |||
424 | cmp r0, r1 | 424 | cmp r0, r1 |
425 | add r2, r2, #2 | 425 | add r2, r2, #2 |
426 | bcc 1b | 426 | bcc 1b |
427 | ldmia sp!, { r4-r11, pc } | 427 | ldmpc regs=r4-r11 |
428 | 2: | 428 | 2: |
429 | ldr r14, =4433 | 429 | ldr r14, =4433 |
430 | ldr r12, =-15137 | 430 | ldr r12, =-15137 |
@@ -586,7 +586,7 @@ jpeg_idct8v: | |||
586 | cmp r0, r1 | 586 | cmp r0, r1 |
587 | add r2, r2, #2 | 587 | add r2, r2, #2 |
588 | bcc 1b | 588 | bcc 1b |
589 | ldmia sp!, { r4-r11, pc } | 589 | ldmpc regs=r4-r11 |
590 | .size jpeg_idct8v, .-jpeg_idct8v | 590 | .size jpeg_idct8v, .-jpeg_idct8v |
591 | 591 | ||
592 | #if ARM_ARCH > 4 | 592 | #if ARM_ARCH > 4 |
@@ -631,7 +631,7 @@ jpeg_idct8h: | |||
631 | add r1, r1, r3 | 631 | add r1, r1, r3 |
632 | cmp r0, r2 | 632 | cmp r0, r2 |
633 | bcc 1b | 633 | bcc 1b |
634 | ldmia sp!, { r4-r11, pc } | 634 | ldmpc regs=r4-r11 |
635 | 2: | 635 | 2: |
636 | ldr r14, =4433 | 636 | ldr r14, =4433 |
637 | ldr r12, =-15137 | 637 | ldr r12, =-15137 |
@@ -826,9 +826,9 @@ jpeg_idct8h: | |||
826 | add r1, r1, r3 | 826 | add r1, r1, r3 |
827 | cmp r0, r2 | 827 | cmp r0, r2 |
828 | bcc 1b | 828 | bcc 1b |
829 | ldmia sp!, { r4-r11, pc } | 829 | ldmpc regs=r4-r11 |
830 | .size jpeg_idct8h, .-jpeg_idct8h | 830 | .size jpeg_idct8h, .-jpeg_idct8h |
831 | #else | 831 | #else /* ARMv6+ */ |
832 | jpeg_idct8v: | 832 | jpeg_idct8v: |
833 | stmdb sp!, { r4-r11, lr } | 833 | stmdb sp!, { r4-r11, lr } |
834 | add r2, r0, #128 | 834 | add r2, r0, #128 |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 5947ca171e..3e269c287d 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -710,6 +710,26 @@ Lyre prototype 1 */ | |||
710 | #define ROCKBOX_STRICT_ALIGN 1 | 710 | #define ROCKBOX_STRICT_ALIGN 1 |
711 | #endif | 711 | #endif |
712 | 712 | ||
713 | #if defined(CPU_ARM) && defined(__ASSEMBLER__) | ||
714 | /* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */ | ||
715 | .macro ldmpc cond="", order="ia", regs:req | ||
716 | #if ARM_ARCH == 4 && defined(USE_THUMB) | ||
717 | ldm\cond\order sp!, { \regs, lr } | ||
718 | bx\cond lr | ||
719 | #else | ||
720 | ldm\cond\order sp!, { \regs, pc } | ||
721 | #endif | ||
722 | .endm | ||
723 | .macro ldrpc cond="" | ||
724 | #if ARM_ARCH == 4 && defined(USE_THUMB) | ||
725 | ldr\cond lr, [sp], #4 | ||
726 | bx\cond lr | ||
727 | #else | ||
728 | ldr\cond pc, [sp], #4 | ||
729 | #endif | ||
730 | .endm | ||
731 | #endif | ||
732 | |||
713 | #ifndef CODEC_SIZE | 733 | #ifndef CODEC_SIZE |
714 | #define CODEC_SIZE 0 | 734 | #define CODEC_SIZE 0 |
715 | #endif | 735 | #endif |
diff --git a/firmware/target/arm/as3525/lcd-as-e200v2-fuze-fuzev2.S b/firmware/target/arm/as3525/lcd-as-e200v2-fuze-fuzev2.S index f71216c674..690641c850 100644 --- a/firmware/target/arm/as3525/lcd-as-e200v2-fuze-fuzev2.S +++ b/firmware/target/arm/as3525/lcd-as-e200v2-fuze-fuzev2.S | |||
@@ -241,7 +241,7 @@ lcd_write_yuv420_lines: | |||
241 | tst r7, #DBOP_BUSY @ fifo not empty? | 241 | tst r7, #DBOP_BUSY @ fifo not empty? |
242 | beq 1b @ | 242 | beq 1b @ |
243 | 243 | ||
244 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 244 | ldmpc regs=r4-r11 @ restore registers and return |
245 | .ltorg @ dump constant pool | 245 | .ltorg @ dump constant pool |
246 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 246 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
247 | 247 | ||
@@ -545,6 +545,6 @@ lcd_write_yuv420_lines_odither: | |||
545 | tst r7, #DBOP_BUSY @ fifo not empty? | 545 | tst r7, #DBOP_BUSY @ fifo not empty? |
546 | beq 1b @ | 546 | beq 1b @ |
547 | 547 | ||
548 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 548 | ldmpc regs=r4-r11 @ restore registers and return |
549 | .ltorg @ dump constant pool | 549 | .ltorg @ dump constant pool |
550 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 550 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S b/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S index 942ddf79f8..431dc62da0 100644 --- a/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S +++ b/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | ||
22 | #include "as3525.h" | 23 | #include "as3525.h" |
23 | 24 | ||
24 | .text | 25 | .text |
@@ -90,5 +91,5 @@ lcd_grey_data: | |||
90 | ands r5, r5, #(1<<10) @ wait until push fifo empties | 91 | ands r5, r5, #(1<<10) @ wait until push fifo empties |
91 | beq 1b | 92 | beq 1b |
92 | 93 | ||
93 | ldmfd sp!, {r4-r7, pc} | 94 | ldmpc regs=r4-r7 |
94 | .size lcd_grey_data,.-lcd_grey_data | 95 | .size lcd_grey_data,.-lcd_grey_data |
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 |
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: | |||
97 | subs r1, r1, #1 | 97 | subs r1, r1, #1 |
98 | bne .sloop | 98 | bne .sloop |
99 | 99 | ||
100 | ldmfd sp!, {r4, pc} | 100 | ldmpc regs=r4 |
101 | .size lcd_write_data_shifted,.-lcd_write_data_shifted | 101 | .size lcd_write_data_shifted,.-lcd_write_data_shifted |
102 | 102 | ||
103 | #elif defined IPOD_MINI | 103 | #elif defined IPOD_MINI |
@@ -132,7 +132,7 @@ lcd_write_data_shifted: | |||
132 | subs r1, r1, #1 | 132 | subs r1, r1, #1 |
133 | bne .sloop | 133 | bne .sloop |
134 | 134 | ||
135 | ldr pc, [sp], #4 | 135 | ldrpc |
136 | .size lcd_write_data_shifted,.-lcd_write_data_shifted | 136 | .size lcd_write_data_shifted,.-lcd_write_data_shifted |
137 | 137 | ||
138 | #endif | 138 | #endif |
@@ -179,7 +179,7 @@ lcd_mono_data: | |||
179 | subs r1, r1, #1 | 179 | subs r1, r1, #1 |
180 | bne .mloop | 180 | bne .mloop |
181 | 181 | ||
182 | ldmfd sp!, {r4, pc} | 182 | ldmpc regs=r4 |
183 | 183 | ||
184 | .dibits: | 184 | .dibits: |
185 | .byte 0x00, 0x03, 0x0C, 0x0F, 0x30, 0x33, 0x3C, 0x3F | 185 | .byte 0x00, 0x03, 0x0C, 0x0F, 0x30, 0x33, 0x3C, 0x3F |
@@ -267,6 +267,6 @@ lcd_grey_data: | |||
267 | subs r2, r2, #1 | 267 | subs r2, r2, #1 |
268 | bne .greyloop | 268 | bne .greyloop |
269 | 269 | ||
270 | ldmfd sp!, {r4-r7, pc} | 270 | ldmpc regs=r4-r7 |
271 | .size lcd_grey_data,.-lcd_grey_data | 271 | .size lcd_grey_data,.-lcd_grey_data |
272 | 272 | ||
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 |
diff --git a/firmware/target/arm/iriver/h10/lcd-as-h10.S b/firmware/target/arm/iriver/h10/lcd-as-h10.S index b3f12e46b6..8e851d8441 100644 --- a/firmware/target/arm/iriver/h10/lcd-as-h10.S +++ b/firmware/target/arm/iriver/h10/lcd-as-h10.S | |||
@@ -232,7 +232,7 @@ lcd_write_yuv420_lines: | |||
232 | subs r1, r1, #2 @ subtract block from width | 232 | subs r1, r1, #2 @ subtract block from width |
233 | bgt 10b @ loop line @ | 233 | bgt 10b @ loop line @ |
234 | @ | 234 | @ |
235 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 235 | ldmpc regs=r4-r11 @ restore registers and return |
236 | .ltorg @ dump constant pool | 236 | .ltorg @ dump constant pool |
237 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 237 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
238 | 238 | ||
@@ -533,6 +533,6 @@ lcd_write_yuv420_lines_odither: | |||
533 | subs r1, r1, #2 @ subtract block from width | 533 | subs r1, r1, #2 @ subtract block from width |
534 | bgt 10b @ loop line @ | 534 | bgt 10b @ loop line @ |
535 | @ | 535 | @ |
536 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 536 | ldmpc regs=r4-r11 @ restore registers and return |
537 | .ltorg @ dump constant pool | 537 | .ltorg @ dump constant pool |
538 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 538 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/lcd-as-memframe.S b/firmware/target/arm/lcd-as-memframe.S index 4532bab221..87cbb611ca 100644 --- a/firmware/target/arm/lcd-as-memframe.S +++ b/firmware/target/arm/lcd-as-memframe.S | |||
@@ -101,7 +101,7 @@ lcd_copy_buffer_rect: @ | |||
101 | add r0, r0, r4, lsl #1 @ | 101 | add r0, r0, r4, lsl #1 @ |
102 | subs r3, r3, #1 @ next line | 102 | subs r3, r3, #1 @ next line |
103 | bgt 10b @ copy line @ | 103 | bgt 10b @ copy line @ |
104 | ldmfd sp!, { r4-r11, pc } @ restore regs and return | 104 | ldmpc regs=r4-r11 @ restore regs and return |
105 | .ltorg @ dump constant pool | 105 | .ltorg @ dump constant pool |
106 | .size lcd_copy_buffer_rect, .-lcd_copy_buffer_rect | 106 | .size lcd_copy_buffer_rect, .-lcd_copy_buffer_rect |
107 | 107 | ||
@@ -344,7 +344,7 @@ lcd_write_yuv420_lines: | |||
344 | subs r2, r2, #2 @ subtract block from width | 344 | subs r2, r2, #2 @ subtract block from width |
345 | bgt 10b @ loop line @ | 345 | bgt 10b @ loop line @ |
346 | @ | 346 | @ |
347 | ldmfd sp!, { r4-r10, pc } @ restore registers and return | 347 | ldmpc regs=r4-r10 @ restore registers and return |
348 | .ltorg @ dump constant pool | 348 | .ltorg @ dump constant pool |
349 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 349 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
350 | 350 | ||
@@ -691,6 +691,6 @@ lcd_write_yuv420_lines_odither: | |||
691 | subs r2, r2, #2 @ subtract block from width | 691 | subs r2, r2, #2 @ subtract block from width |
692 | bgt 10b @ loop line @ | 692 | bgt 10b @ loop line @ |
693 | @ | 693 | @ |
694 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 694 | ldmpc regs=r4-r11 @ restore registers and return |
695 | .ltorg @ dump constant pool | 695 | .ltorg @ dump constant pool |
696 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 696 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/memcpy-arm.S b/firmware/target/arm/memcpy-arm.S index d17d659a28..2a55fb5656 100644 --- a/firmware/target/arm/memcpy-arm.S +++ b/firmware/target/arm/memcpy-arm.S | |||
@@ -98,7 +98,7 @@ memcpy: | |||
98 | strcsb r4, [r0], #1 | 98 | strcsb r4, [r0], #1 |
99 | strcsb ip, [r0] | 99 | strcsb ip, [r0] |
100 | 100 | ||
101 | ldmfd sp!, {r0, r4, pc} | 101 | ldmpc regs="r0, r4" |
102 | 102 | ||
103 | 9: rsb ip, ip, #4 | 103 | 9: rsb ip, ip, #4 |
104 | cmp ip, #2 | 104 | cmp ip, #2 |
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: | |||
112 | strneb r3, [r0, #-1]! | 112 | strneb r3, [r0, #-1]! |
113 | strcsb r4, [r0, #-1]! | 113 | strcsb r4, [r0, #-1]! |
114 | strcsb ip, [r0, #-1] | 114 | strcsb ip, [r0, #-1] |
115 | ldmfd sp!, {r0, r4, pc} | 115 | ldmpc regs="r0, r4" |
116 | 116 | ||
117 | 9: cmp ip, #2 | 117 | 9: cmp ip, #2 |
118 | ldrgtb r3, [r1, #-1]! | 118 | ldrgtb r3, [r1, #-1]! |
diff --git a/firmware/target/arm/memset-arm.S b/firmware/target/arm/memset-arm.S index 5dbde7a1d7..682da874ce 100644 --- a/firmware/target/arm/memset-arm.S +++ b/firmware/target/arm/memset-arm.S | |||
@@ -69,7 +69,7 @@ memset: | |||
69 | stmgedb r0!, {r1, r3, ip, lr} | 69 | stmgedb r0!, {r1, r3, ip, lr} |
70 | stmgedb r0!, {r1, r3, ip, lr} | 70 | stmgedb r0!, {r1, r3, ip, lr} |
71 | bgt 3b | 71 | bgt 3b |
72 | ldreq pc, [sp], #4 @ Now <64 bytes to go. | 72 | ldrpc cond=eq @ Now <64 bytes to go. |
73 | /* | 73 | /* |
74 | * No need to correct the count; we're only testing bits from now on | 74 | * No need to correct the count; we're only testing bits from now on |
75 | */ | 75 | */ |
diff --git a/firmware/target/arm/memset16-arm.S b/firmware/target/arm/memset16-arm.S index 63d626480e..5c787b1bed 100644 --- a/firmware/target/arm/memset16-arm.S +++ b/firmware/target/arm/memset16-arm.S | |||
@@ -59,7 +59,7 @@ memset16: | |||
59 | stmgeia r0!, {r1, r3, ip, lr} | 59 | stmgeia r0!, {r1, r3, ip, lr} |
60 | stmgeia r0!, {r1, r3, ip, lr} | 60 | stmgeia r0!, {r1, r3, ip, lr} |
61 | bgt 2b | 61 | bgt 2b |
62 | ldreq pc, [sp], #4 @ Now <64 bytes to go. | 62 | ldrpc cond=eq @ Now <64 bytes to go. |
63 | /* | 63 | /* |
64 | * No need to correct the count; we're only testing bits from now on | 64 | * No need to correct the count; we're only testing bits from now on |
65 | */ | 65 | */ |
diff --git a/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S b/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S index 6db6c7efad..09778014c1 100644 --- a/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S +++ b/firmware/target/arm/olympus/mrobe-100/lcd-as-mr100.S | |||
@@ -99,6 +99,6 @@ lcd_grey_data: | |||
99 | subs r2, r2, #1 | 99 | subs r2, r2, #1 |
100 | bne .greyloop | 100 | bne .greyloop |
101 | 101 | ||
102 | ldmfd sp!, {r4-r7, pc} | 102 | ldmpc regs=r4-r7 |
103 | .size lcd_grey_data,.-lcd_grey_data | 103 | .size lcd_grey_data,.-lcd_grey_data |
104 | 104 | ||
diff --git a/firmware/target/arm/pbell/vibe500/lcd-as-vibe500.S b/firmware/target/arm/pbell/vibe500/lcd-as-vibe500.S index d5d51575a7..9079be6aa7 100644 --- a/firmware/target/arm/pbell/vibe500/lcd-as-vibe500.S +++ b/firmware/target/arm/pbell/vibe500/lcd-as-vibe500.S | |||
@@ -243,7 +243,7 @@ lcd_write_yuv420_lines: | |||
243 | subs r1, r1, #2 @ subtract block from width | 243 | subs r1, r1, #2 @ subtract block from width |
244 | bgt 10b @ loop line @ | 244 | bgt 10b @ loop line @ |
245 | @ | 245 | @ |
246 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 246 | ldmpc regs=r4-r11 @ restore registers and return |
247 | .ltorg @ dump constant pool | 247 | .ltorg @ dump constant pool |
248 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 248 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
249 | 249 | ||
@@ -551,6 +551,6 @@ lcd_write_yuv420_lines_odither: | |||
551 | subs r1, r1, #2 @ subtract block from width | 551 | subs r1, r1, #2 @ subtract block from width |
552 | bgt 10b @ loop line @ | 552 | bgt 10b @ loop line @ |
553 | @ | 553 | @ |
554 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 554 | ldmpc regs=r4-r11 @ restore registers and return |
555 | .ltorg @ dump constant pool | 555 | .ltorg @ dump constant pool |
556 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 556 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c index 6289b4c730..bffc69f771 100644 --- a/firmware/target/arm/pcm-pp.c +++ b/firmware/target/arm/pcm-pp.c | |||
@@ -74,9 +74,14 @@ void fiq_handler(void) ICODE_ATTR __attribute__((naked)); | |||
74 | void fiq_handler(void) | 74 | void fiq_handler(void) |
75 | { | 75 | { |
76 | asm volatile ( | 76 | asm volatile ( |
77 | "ldr pc, [pc, #-4] \n" | 77 | #if ARM_ARCH == 4 && defined(USE_THUMB) |
78 | "fiq_function: \n" | 78 | "ldr r12, [pc, #-4] \n" |
79 | ".word 0 \n" | 79 | "bx r12 \n" |
80 | #else | ||
81 | "ldr pc, [pc, #-4] \n" | ||
82 | #endif | ||
83 | "fiq_function: \n" | ||
84 | ".word 0 \n" | ||
80 | ); | 85 | ); |
81 | } | 86 | } |
82 | 87 | ||
diff --git a/firmware/target/arm/philips/hdd1630/lcd-as-hdd1630.S b/firmware/target/arm/philips/hdd1630/lcd-as-hdd1630.S index 73ad84ae45..7be807ae98 100644 --- a/firmware/target/arm/philips/hdd1630/lcd-as-hdd1630.S +++ b/firmware/target/arm/philips/hdd1630/lcd-as-hdd1630.S | |||
@@ -248,7 +248,7 @@ lcd_write_yuv420_lines: | |||
248 | subs r1, r1, #2 @ subtract block from width | 248 | subs r1, r1, #2 @ subtract block from width |
249 | bgt 10b @ loop line @ | 249 | bgt 10b @ loop line @ |
250 | @ | 250 | @ |
251 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 251 | ldmpc regs=r4-r11 @ restore registers and return |
252 | .ltorg @ dump constant pool | 252 | .ltorg @ dump constant pool |
253 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 253 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
254 | 254 | ||
@@ -565,6 +565,6 @@ lcd_write_yuv420_lines_odither: | |||
565 | subs r1, r1, #2 @ subtract block from width | 565 | subs r1, r1, #2 @ subtract block from width |
566 | bgt 10b @ loop line @ | 566 | bgt 10b @ loop line @ |
567 | @ | 567 | @ |
568 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 568 | ldmpc regs=r4-r11 @ restore registers and return |
569 | .ltorg @ dump constant pool | 569 | .ltorg @ dump constant pool |
570 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 570 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/samsung/yh820/lcd-as-yh820.S b/firmware/target/arm/samsung/yh820/lcd-as-yh820.S index 581a4f3fc3..d8dfccc37b 100644 --- a/firmware/target/arm/samsung/yh820/lcd-as-yh820.S +++ b/firmware/target/arm/samsung/yh820/lcd-as-yh820.S | |||
@@ -238,7 +238,7 @@ lcd_write_yuv420_lines: | |||
238 | subs r1, r1, #2 @ subtract block from width | 238 | subs r1, r1, #2 @ subtract block from width |
239 | bgt 10b @ loop line @ | 239 | bgt 10b @ loop line @ |
240 | @ | 240 | @ |
241 | ldmfd sp!, { r4-r10, pc } @ restore registers and return | 241 | ldmpc regs=r4-r10 @ restore registers and return |
242 | .ltorg @ dump constant pool | 242 | .ltorg @ dump constant pool |
243 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 243 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
244 | 244 | ||
@@ -545,6 +545,6 @@ lcd_write_yuv420_lines_odither: | |||
545 | subs r1, r1, #2 @ subtract block from width | 545 | subs r1, r1, #2 @ subtract block from width |
546 | bgt 10b @ loop line @ | 546 | bgt 10b @ loop line @ |
547 | @ | 547 | @ |
548 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 548 | ldmpc regs=r4-r11 @ restore registers and return |
549 | .ltorg @ dump constant pool | 549 | .ltorg @ dump constant pool |
550 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 550 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/samsung/yh920/lcd-as-yh920.S b/firmware/target/arm/samsung/yh920/lcd-as-yh920.S index 2c7f5110bf..130addf460 100644 --- a/firmware/target/arm/samsung/yh920/lcd-as-yh920.S +++ b/firmware/target/arm/samsung/yh920/lcd-as-yh920.S | |||
@@ -113,6 +113,6 @@ lcd_grey_data: | |||
113 | subs r2, r2, #1 | 113 | subs r2, r2, #1 |
114 | bne .greyloop | 114 | bne .greyloop |
115 | 115 | ||
116 | ldmfd sp!, {r4-r5, pc} | 116 | ldmpc regs=r4-r5 |
117 | .size lcd_grey_data,.-lcd_grey_data | 117 | .size lcd_grey_data,.-lcd_grey_data |
118 | 118 | ||
diff --git a/firmware/target/arm/samsung/yh925/lcd-as-yh925.S b/firmware/target/arm/samsung/yh925/lcd-as-yh925.S index b3f12e46b6..8e851d8441 100644 --- a/firmware/target/arm/samsung/yh925/lcd-as-yh925.S +++ b/firmware/target/arm/samsung/yh925/lcd-as-yh925.S | |||
@@ -232,7 +232,7 @@ lcd_write_yuv420_lines: | |||
232 | subs r1, r1, #2 @ subtract block from width | 232 | subs r1, r1, #2 @ subtract block from width |
233 | bgt 10b @ loop line @ | 233 | bgt 10b @ loop line @ |
234 | @ | 234 | @ |
235 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 235 | ldmpc regs=r4-r11 @ restore registers and return |
236 | .ltorg @ dump constant pool | 236 | .ltorg @ dump constant pool |
237 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 237 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
238 | 238 | ||
@@ -533,6 +533,6 @@ lcd_write_yuv420_lines_odither: | |||
533 | subs r1, r1, #2 @ subtract block from width | 533 | subs r1, r1, #2 @ subtract block from width |
534 | bgt 10b @ loop line @ | 534 | bgt 10b @ loop line @ |
535 | @ | 535 | @ |
536 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 536 | ldmpc regs=r4-r11 @ restore registers and return |
537 | .ltorg @ dump constant pool | 537 | .ltorg @ dump constant pool |
538 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 538 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/sandisk/sansa-c200/lcd-as-c200.S b/firmware/target/arm/sandisk/sansa-c200/lcd-as-c200.S index 581a4f3fc3..d8dfccc37b 100644 --- a/firmware/target/arm/sandisk/sansa-c200/lcd-as-c200.S +++ b/firmware/target/arm/sandisk/sansa-c200/lcd-as-c200.S | |||
@@ -238,7 +238,7 @@ lcd_write_yuv420_lines: | |||
238 | subs r1, r1, #2 @ subtract block from width | 238 | subs r1, r1, #2 @ subtract block from width |
239 | bgt 10b @ loop line @ | 239 | bgt 10b @ loop line @ |
240 | @ | 240 | @ |
241 | ldmfd sp!, { r4-r10, pc } @ restore registers and return | 241 | ldmpc regs=r4-r10 @ restore registers and return |
242 | .ltorg @ dump constant pool | 242 | .ltorg @ dump constant pool |
243 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines | 243 | .size lcd_write_yuv420_lines, .-lcd_write_yuv420_lines |
244 | 244 | ||
@@ -545,6 +545,6 @@ lcd_write_yuv420_lines_odither: | |||
545 | subs r1, r1, #2 @ subtract block from width | 545 | subs r1, r1, #2 @ subtract block from width |
546 | bgt 10b @ loop line @ | 546 | bgt 10b @ loop line @ |
547 | @ | 547 | @ |
548 | ldmfd sp!, { r4-r11, pc } @ restore registers and return | 548 | ldmpc regs=r4-r11 @ restore registers and return |
549 | .ltorg @ dump constant pool | 549 | .ltorg @ dump constant pool |
550 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither | 550 | .size lcd_write_yuv420_lines_odither, .-lcd_write_yuv420_lines_odither |
diff --git a/firmware/target/arm/thread-arm.c b/firmware/target/arm/thread-arm.c index c2d91cec25..9ea3d0bef9 100644 --- a/firmware/target/arm/thread-arm.c +++ b/firmware/target/arm/thread-arm.c | |||
@@ -77,7 +77,15 @@ static inline void load_context(const void* addr) | |||
77 | asm volatile( | 77 | asm volatile( |
78 | "ldr r0, [%0, #40] \n" /* Load start pointer */ | 78 | "ldr r0, [%0, #40] \n" /* Load start pointer */ |
79 | "cmp r0, #0 \n" /* Check for NULL */ | 79 | "cmp r0, #0 \n" /* Check for NULL */ |
80 | "ldmneia %0, { r0, pc } \n" /* If not already running, jump to start */ | 80 | |
81 | /* If not already running, jump to start */ | ||
82 | #if ARM_ARCH == 4 && defined(USE_THUMB) | ||
83 | "ldmneia %0, { r0, r12 } \n" | ||
84 | "bxne r12 \n" | ||
85 | #else | ||
86 | "ldmneia %0, { r0, pc } \n" | ||
87 | #endif | ||
88 | |||
81 | "ldmia %0, { r4-r11, sp, lr } \n" /* Load regs r4 to r14 from context */ | 89 | "ldmia %0, { r4-r11, sp, lr } \n" /* Load regs r4 to r14 from context */ |
82 | : : "r" (addr) : "r0" /* only! */ | 90 | : : "r" (addr) : "r0" /* only! */ |
83 | ); | 91 | ); |