mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
ARM asm LCD and ATA driver functions: Don't save r12 as it is a scratch reg. Saves a bit of stack and execution time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21795 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
fa59ed6ae7
commit
47d4c4739b
12 changed files with 256 additions and 261 deletions
|
|
@ -39,15 +39,15 @@
|
|||
* r3/r4 - current block of phases
|
||||
* r5/r6 - current block of values
|
||||
* r7 - lcd data accumulator
|
||||
* r8 - phase signs mask
|
||||
* r12 - phase signs mask
|
||||
* lr - lcd bridge address
|
||||
*/
|
||||
|
||||
lcd_grey_data:
|
||||
stmfd sp!, {r4-r8, lr}
|
||||
mov r8, #0x80
|
||||
orr r8, r8, r8, lsl #8
|
||||
orr r8, r8, r8, lsl #16
|
||||
stmfd sp!, {r4-r7, lr}
|
||||
mov r12, #0x80
|
||||
orr r12, r12, r12, lsl #8
|
||||
orr r12, r12, r12, lsl #16
|
||||
|
||||
ldr lr, =GPIOA_BASE
|
||||
mov r3, #(1<<5)
|
||||
|
|
@ -70,7 +70,7 @@ lcd_grey_data:
|
|||
orrne r7, r7, #0x2000
|
||||
tst r3, #0x80000000
|
||||
orrne r7, r7, #0x1000
|
||||
bic r3, r3, r8
|
||||
bic r3, r3, r12
|
||||
add r3, r3, r5
|
||||
|
||||
/* set bits 3..0 */
|
||||
|
|
@ -82,7 +82,7 @@ lcd_grey_data:
|
|||
orrne r7, r7, #0x02
|
||||
tst r4, #0x80000000
|
||||
orrne r7, r7, #0x01
|
||||
bic r4, r4, r8
|
||||
bic r4, r4, r12
|
||||
add r4, r4, r6
|
||||
|
||||
stmia r1!, {r3-r4}
|
||||
|
|
@ -102,5 +102,5 @@ lcd_grey_data:
|
|||
ands r5, r5, #(1<<10) @ wait until push fifo empties
|
||||
beq 1b
|
||||
|
||||
ldmfd sp!, {r4-r8, pc}
|
||||
ldmfd sp!, {r4-r7, pc}
|
||||
.size lcd_grey_data,.-lcd_grey_data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue