summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-clip
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2009-07-11 23:43:44 +0000
committerJens Arnold <amiconn@rockbox.org>2009-07-11 23:43:44 +0000
commit47d4c4739bafcb9864dc8d1c2b44903ad4f75b68 (patch)
tree7a9f510c72a0df2ddacb0f6ec393658cf676b8d4 /firmware/target/arm/as3525/sansa-clip
parentfa59ed6ae724b3f75c8ba35efcf7ce18f21e3ed2 (diff)
downloadrockbox-47d4c4739bafcb9864dc8d1c2b44903ad4f75b68.tar.gz
rockbox-47d4c4739bafcb9864dc8d1c2b44903ad4f75b68.zip
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
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clip')
-rw-r--r--firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S16
1 files changed, 8 insertions, 8 deletions
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 ed430178b9..5a52eb032c 100644
--- a/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S
+++ b/firmware/target/arm/as3525/sansa-clip/lcd-as-clip.S
@@ -39,15 +39,15 @@
39 * r3/r4 - current block of phases 39 * r3/r4 - current block of phases
40 * r5/r6 - current block of values 40 * r5/r6 - current block of values
41 * r7 - lcd data accumulator 41 * r7 - lcd data accumulator
42 * r8 - phase signs mask 42 * r12 - phase signs mask
43 * lr - lcd bridge address 43 * lr - lcd bridge address
44 */ 44 */
45 45
46lcd_grey_data: 46lcd_grey_data:
47 stmfd sp!, {r4-r8, lr} 47 stmfd sp!, {r4-r7, lr}
48 mov r8, #0x80 48 mov r12, #0x80
49 orr r8, r8, r8, lsl #8 49 orr r12, r12, r12, lsl #8
50 orr r8, r8, r8, lsl #16 50 orr r12, r12, r12, lsl #16
51 51
52 ldr lr, =GPIOA_BASE 52 ldr lr, =GPIOA_BASE
53 mov r3, #(1<<5) 53 mov r3, #(1<<5)
@@ -70,7 +70,7 @@ lcd_grey_data:
70 orrne r7, r7, #0x2000 70 orrne r7, r7, #0x2000
71 tst r3, #0x80000000 71 tst r3, #0x80000000
72 orrne r7, r7, #0x1000 72 orrne r7, r7, #0x1000
73 bic r3, r3, r8 73 bic r3, r3, r12
74 add r3, r3, r5 74 add r3, r3, r5
75 75
76 /* set bits 3..0 */ 76 /* set bits 3..0 */
@@ -82,7 +82,7 @@ lcd_grey_data:
82 orrne r7, r7, #0x02 82 orrne r7, r7, #0x02
83 tst r4, #0x80000000 83 tst r4, #0x80000000
84 orrne r7, r7, #0x01 84 orrne r7, r7, #0x01
85 bic r4, r4, r8 85 bic r4, r4, r12
86 add r4, r4, r6 86 add r4, r4, r6
87 87
88 stmia r1!, {r3-r4} 88 stmia r1!, {r3-r4}
@@ -102,5 +102,5 @@ lcd_grey_data:
102 ands r5, r5, #(1<<10) @ wait until push fifo empties 102 ands r5, r5, #(1<<10) @ wait until push fifo empties
103 beq 1b 103 beq 1b
104 104
105 ldmfd sp!, {r4-r8, pc} 105 ldmfd sp!, {r4-r7, pc}
106 .size lcd_grey_data,.-lcd_grey_data 106 .size lcd_grey_data,.-lcd_grey_data