diff options
Diffstat (limited to 'arch/arm/lib/io-writesb.S')
-rw-r--r-- | arch/arm/lib/io-writesb.S | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/lib/io-writesb.S b/arch/arm/lib/io-writesb.S index b919fdaad..a9a8c4af9 100644 --- a/arch/arm/lib/io-writesb.S +++ b/arch/arm/lib/io-writesb.S @@ -1,5 +1,5 @@ /* - * linux/arch/arm/lib/io-readsb.S + * linux/arch/arm/lib/io-writesb.S * * Copyright (C) 1995-2000 Russell King * @@ -13,7 +13,7 @@ .outsb_align: rsb ip, ip, #4 cmp ip, r2 - mov ip, r2 + movgt ip, r2 cmp ip, #2 ldrb r3, [r1], #1 strb r3, [r0] @@ -34,6 +34,7 @@ ENTRY(__arch_writesb) bmi .outsb_no_16 .outsb_16_lp: ldmia r1!, {r3 - r6} + strb r3, [r0] mov r3, r3, lsr #8 strb r3, [r0] @@ -65,6 +66,7 @@ ENTRY(__arch_writesb) strb r6, [r0] mov r6, r6, lsr #8 strb r6, [r0] + subs r2, r2, #16 bpl .outsb_16_lp @@ -74,7 +76,8 @@ ENTRY(__arch_writesb) .outsb_no_16: tst r2, #8 beq .outsb_no_8 - ldmia r1, {r3, r4} + ldmia r1!, {r3, r4} + strb r3, [r0] mov r3, r3, lsr #8 strb r3, [r0] @@ -92,7 +95,7 @@ ENTRY(__arch_writesb) strb r4, [r0] .outsb_no_8: tst r2, #4 - bne .outsb_no_4 + beq .outsb_no_4 ldr r3, [r1], #4 strb r3, [r0] @@ -105,6 +108,7 @@ ENTRY(__arch_writesb) .outsb_no_4: ands r2, r2, #3 LOADREGS(eqfd, sp!, {r4 - r6, pc}) + cmp r2, #2 ldrb r3, [r1], #1 strb r3, [r0] @@ -112,4 +116,5 @@ ENTRY(__arch_writesb) strgeb r3, [r0] ldrgtb r3, [r1] strgtb r3, [r0] + LOADREGS(fd, sp!, {r4 - r6, pc}) |