X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=arch%2Farm%2Flib%2Fio-writesl.S;h=f8f14dd227ca7c1ac26fc9ffeaa9d514f7b9370e;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=20b3ee2ef5db637a45d8f7f1c7dcb17e704636d5;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/arm/lib/io-writesl.S b/arch/arm/lib/io-writesl.S index 20b3ee2ef..f8f14dd22 100644 --- a/arch/arm/lib/io-writesl.S +++ b/arch/arm/lib/io-writesl.S @@ -9,53 +9,58 @@ */ #include #include -#include ENTRY(__raw_writesl) teq r2, #0 @ do we have to check for the zero len? moveq pc, lr ands ip, r1, #3 - bne 2f + bne 3f - tst r2, #1 - ldrne r3, [r1], #4 - strne r3, [r0, #0] -1: subs r2, r2, #2 - ldrcs r3, [r1], #4 - ldrcs ip, [r1], #4 + subs r2, r2, #4 + bmi 2f + stmfd sp!, {r4, lr} +1: ldmia r1!, {r3, r4, ip, lr} + subs r2, r2, #4 + str r3, [r0, #0] + str r4, [r0, #0] + str ip, [r0, #0] + str lr, [r0, #0] + bpl 1b + ldmfd sp!, {r4, lr} +2: movs r2, r2, lsl #31 + ldmcsia r1!, {r3, ip} strcs r3, [r0, #0] + ldrne r3, [r1, #0] strcs ip, [r0, #0] - bcs 1b + strne r3, [r0, #0] mov pc, lr -2: bic r1, r1, #3 - cmp ip, #2 +3: bic r1, r1, #3 ldr r3, [r1], #4 - bgt 4f + cmp ip, #2 blt 5f + bgt 6f -3: mov ip, r3, lsr #16 +4: mov ip, r3, pull #16 ldr r3, [r1], #4 subs r2, r2, #1 - orr ip, ip, r3, lsl #16 - str ip, [r0, #0] - bne 3b + orr ip, ip, r3, push #16 + str ip, [r0] + bne 4b mov pc, lr -4: mov ip, r3, lsr #24 +5: mov ip, r3, pull #8 ldr r3, [r1], #4 subs r2, r2, #1 - orr ip, ip, r3, lsl #8 - str ip, [r0, #0] - bne 4b + orr ip, ip, r3, push #24 + str ip, [r0] + bne 5b mov pc, lr -5: mov ip, r3, lsr #8 +6: mov ip, r3, pull #24 ldr r3, [r1], #4 subs r2, r2, #1 - orr ip, ip, r3, lsl #24 - str ip, [r0, #0] - bne 5b + orr ip, ip, r3, push #8 + str ip, [r0] + bne 6b mov pc, lr - -