Commit 4a69580c authored by Russell King's avatar Russell King

[ARM] Optimise io-writesl for cpus with ldr result delays.

parent 9a81b3b4
...@@ -17,10 +17,15 @@ ENTRY(__raw_writesl) ...@@ -17,10 +17,15 @@ ENTRY(__raw_writesl)
ands ip, r1, #3 ands ip, r1, #3
bne 2f bne 2f
1: ldr r3, [r1], #4 tst r2, #1
str r3, [r0] ldrne r3, [r1], #4
subs r2, r2, #1 strne r3, [r0, #0]
bne 1b 1: subs r2, r2, #2
ldrcs r3, [r1], #4
ldrcs ip, [r1], #4
strcs r3, [r0, #0]
strcs ip, [r0, #0]
bcs 1b
mov pc, lr mov pc, lr
2: bic r1, r1, #3 2: bic r1, r1, #3
...@@ -31,25 +36,25 @@ ENTRY(__raw_writesl) ...@@ -31,25 +36,25 @@ ENTRY(__raw_writesl)
3: mov ip, r3, lsr #16 3: mov ip, r3, lsr #16
ldr r3, [r1], #4 ldr r3, [r1], #4
orr ip, ip, r3, lsl #16
str ip, [r0]
subs r2, r2, #1 subs r2, r2, #1
orr ip, ip, r3, lsl #16
str ip, [r0, #0]
bne 3b bne 3b
mov pc, lr mov pc, lr
4: mov ip, r3, lsr #24 4: mov ip, r3, lsr #24
ldr r3, [r1], #4 ldr r3, [r1], #4
orr ip, ip, r3, lsl #8
str ip, [r0]
subs r2, r2, #1 subs r2, r2, #1
orr ip, ip, r3, lsl #8
str ip, [r0, #0]
bne 4b bne 4b
mov pc, lr mov pc, lr
5: mov ip, r3, lsr #8 5: mov ip, r3, lsr #8
ldr r3, [r1], #4 ldr r3, [r1], #4
orr ip, ip, r3, lsl #24
str ip, [r0]
subs r2, r2, #1 subs r2, r2, #1
orr ip, ip, r3, lsl #24
str ip, [r0, #0]
bne 5b bne 5b
mov pc, lr mov pc, lr
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment