Commit a28efa63 authored by Dirk Behme's avatar Dirk Behme Committed by Russell King

[ARM PATCH] 1749/1: Remove warnings in csumpartialcopygeneric.S

Patch from Dirk Behme

Remove the following warnings from csumpartialcopygeneric.S:

arch/arm/lib/csumpartialcopygeneric.S: Assembler messages:
arch/arm/lib/csumpartialcopygeneric.S:142: Warning: shift of 0 ignored.
arch/arm/lib/csumpartialcopygeneric.S:216: Warning: shift of 0 ignored.
arch/arm/lib/csumpartialcopygeneric.S:268: Warning: shift of 0 ignored.
arch/arm/lib/csumpartialcopygeneric.S:322: Warning: shift of 0 ignored.
arch/arm/lib/csumpartialcopygeneric.S:328: Warning: shift of 0 ignored.

This new patch is reviewed by Nicolas Pitre.
parent 741249e9
...@@ -41,7 +41,7 @@ td3 .req lr ...@@ -41,7 +41,7 @@ td3 .req lr
tst buf, #1 @ odd address? tst buf, #1 @ odd address?
ldrneb td0, [buf], #1 ldrneb td0, [buf], #1
subne len, len, #1 subne len, len, #1
adcnes sum, sum, td0, lsl #byte(1) adcnes sum, sum, td0, put_byte_1
.less4: tst len, #6 .less4: tst len, #6
beq .less8_byte beq .less8_byte
...@@ -68,7 +68,7 @@ td3 .req lr ...@@ -68,7 +68,7 @@ td3 .req lr
.less8_byte: tst len, #1 @ odd number of bytes .less8_byte: tst len, #1 @ odd number of bytes
ldrneb td0, [buf], #1 @ include last byte ldrneb td0, [buf], #1 @ include last byte
adcnes sum, sum, td0, lsl #byte(0) @ update checksum adcnes sum, sum, td0, put_byte_0 @ update checksum
.done: adc r0, sum, #0 @ collect up the last carry .done: adc r0, sum, #0 @ collect up the last carry
ldr td0, [sp], #4 ldr td0, [sp], #4
...@@ -80,7 +80,7 @@ td3 .req lr ...@@ -80,7 +80,7 @@ td3 .req lr
.not_aligned: tst buf, #1 @ odd address .not_aligned: tst buf, #1 @ odd address
ldrneb td0, [buf], #1 @ make even ldrneb td0, [buf], #1 @ make even
subne len, len, #1 subne len, len, #1
adcnes sum, sum, td0, lsl #byte(1) @ update checksum adcnes sum, sum, td0, put_byte_1 @ update checksum
tst buf, #2 @ 32-bit aligned? tst buf, #2 @ 32-bit aligned?
#if __LINUX_ARM_ARCH__ >= 4 #if __LINUX_ARM_ARCH__ >= 4
......
...@@ -36,16 +36,16 @@ sum .req r3 ...@@ -36,16 +36,16 @@ sum .req r3
load1b ip load1b ip
sub len, len, #1 sub len, len, #1
adcs sum, sum, ip, lsl #byte(1) @ update checksum adcs sum, sum, ip, put_byte_1 @ update checksum
strb ip, [dst], #1 strb ip, [dst], #1
tst dst, #2 tst dst, #2
moveq pc, lr @ dst is now 32bit aligned moveq pc, lr @ dst is now 32bit aligned
.dst_16bit: load2b r8, ip .dst_16bit: load2b r8, ip
sub len, len, #2 sub len, len, #2
adcs sum, sum, r8, lsl #byte(0) adcs sum, sum, r8, put_byte_0
strb r8, [dst], #1 strb r8, [dst], #1
adcs sum, sum, ip, lsl #byte(1) adcs sum, sum, ip, put_byte_1
strb ip, [dst], #1 strb ip, [dst], #1
mov pc, lr @ dst is now 32bit aligned mov pc, lr @ dst is now 32bit aligned
...@@ -63,16 +63,16 @@ sum .req r3 ...@@ -63,16 +63,16 @@ sum .req r3
/* Align dst */ /* Align dst */
load1b ip load1b ip
sub len, len, #1 sub len, len, #1
adcs sum, sum, ip, lsl #byte(1) @ update checksum adcs sum, sum, ip, put_byte_1 @ update checksum
strb ip, [dst], #1 strb ip, [dst], #1
tst len, #6 tst len, #6
beq .less8_byteonly beq .less8_byteonly
1: load2b r8, ip 1: load2b r8, ip
sub len, len, #2 sub len, len, #2
adcs sum, sum, r8, lsl #byte(0) adcs sum, sum, r8, put_byte_0
strb r8, [dst], #1 strb r8, [dst], #1
adcs sum, sum, ip, lsl #byte(1) adcs sum, sum, ip, put_byte_1
strb ip, [dst], #1 strb ip, [dst], #1
.less8_aligned: tst len, #6 .less8_aligned: tst len, #6
bne 1b bne 1b
...@@ -80,7 +80,7 @@ sum .req r3 ...@@ -80,7 +80,7 @@ sum .req r3
tst len, #1 tst len, #1
beq .done beq .done
load1b r8 load1b r8
adcs sum, sum, r8, lsl #byte(0) @ update checksum adcs sum, sum, r8, put_byte_0 @ update checksum
strb r8, [dst], #1 strb r8, [dst], #1
b .done b .done
...@@ -139,17 +139,17 @@ FN_ENTRY ...@@ -139,17 +139,17 @@ FN_ENTRY
beq .done beq .done
load1l r4 load1l r4
tst len, #2 tst len, #2
mov r5, r4, lsr #byte(0) mov r5, r4, get_byte_0
beq .exit beq .exit
adcs sum, sum, r4, push #16 adcs sum, sum, r4, push #16
strb r5, [dst], #1 strb r5, [dst], #1
mov r5, r4, lsr #byte(1) mov r5, r4, get_byte_1
strb r5, [dst], #1 strb r5, [dst], #1
mov r5, r4, lsr #byte(2) mov r5, r4, get_byte_2
.exit: tst len, #1 .exit: tst len, #1
strneb r5, [dst], #1 strneb r5, [dst], #1
andne r5, r5, #255 andne r5, r5, #255
adcnes sum, sum, r5, lsl #byte(0) adcnes sum, sum, r5, put_byte_0
/* /*
* If the dst pointer was not 16-bit aligned, we * If the dst pointer was not 16-bit aligned, we
...@@ -213,14 +213,14 @@ FN_ENTRY ...@@ -213,14 +213,14 @@ FN_ENTRY
mov r4, r5, pull #8 mov r4, r5, pull #8
4: ands len, len, #3 4: ands len, len, #3
beq .done beq .done
mov r5, r4, lsr #byte(0) mov r5, r4, get_byte_0
tst len, #2 tst len, #2
beq .exit beq .exit
adcs sum, sum, r4, push #16 adcs sum, sum, r4, push #16
strb r5, [dst], #1 strb r5, [dst], #1
mov r5, r4, lsr #byte(1) mov r5, r4, get_byte_1
strb r5, [dst], #1 strb r5, [dst], #1
mov r5, r4, lsr #byte(2) mov r5, r4, get_byte_2
b .exit b .exit
.src2_aligned: mov r4, r5, pull #16 .src2_aligned: mov r4, r5, pull #16
...@@ -265,12 +265,12 @@ FN_ENTRY ...@@ -265,12 +265,12 @@ FN_ENTRY
mov r4, r5, pull #16 mov r4, r5, pull #16
4: ands len, len, #3 4: ands len, len, #3
beq .done beq .done
mov r5, r4, lsr #byte(0) mov r5, r4, get_byte_0
tst len, #2 tst len, #2
beq .exit beq .exit
adcs sum, sum, r4 adcs sum, sum, r4
strb r5, [dst], #1 strb r5, [dst], #1
mov r5, r4, lsr #byte(1) mov r5, r4, get_byte_1
strb r5, [dst], #1 strb r5, [dst], #1
tst len, #1 tst len, #1
beq .done beq .done
...@@ -319,14 +319,14 @@ FN_ENTRY ...@@ -319,14 +319,14 @@ FN_ENTRY
mov r4, r5, pull #24 mov r4, r5, pull #24
4: ands len, len, #3 4: ands len, len, #3
beq .done beq .done
mov r5, r4, lsr #byte(0) mov r5, r4, get_byte_0
tst len, #2 tst len, #2
beq .exit beq .exit
strb r5, [dst], #1 strb r5, [dst], #1
adcs sum, sum, r4 adcs sum, sum, r4
load1l r4 load1l r4
mov r5, r4, lsr #byte(0) mov r5, r4, get_byte_0
strb r5, [dst], #1 strb r5, [dst], #1
adcs sum, sum, r4, push #24 adcs sum, sum, r4, push #24
mov r5, r4, lsr #byte(1) mov r5, r4, get_byte_1
b .exit b .exit
...@@ -37,35 +37,35 @@ ENTRY(__raw_readsb) ...@@ -37,35 +37,35 @@ ENTRY(__raw_readsb)
.insb_16_lp: ldrb r3, [r0] .insb_16_lp: ldrb r3, [r0]
ldrb r4, [r0] ldrb r4, [r0]
ldrb r5, [r0] ldrb r5, [r0]
mov r3, r3, lsl #byte(0) mov r3, r3, put_byte_0
ldrb r6, [r0] ldrb r6, [r0]
orr r3, r3, r4, lsl #byte(1) orr r3, r3, r4, put_byte_1
ldrb r4, [r0] ldrb r4, [r0]
orr r3, r3, r5, lsl #byte(2) orr r3, r3, r5, put_byte_2
ldrb r5, [r0] ldrb r5, [r0]
orr r3, r3, r6, lsl #byte(3) orr r3, r3, r6, put_byte_3
ldrb r6, [r0] ldrb r6, [r0]
mov r4, r4, lsl #byte(0) mov r4, r4, put_byte_0
ldrb ip, [r0] ldrb ip, [r0]
orr r4, r4, r5, lsl #byte(1) orr r4, r4, r5, put_byte_1
ldrb r5, [r0] ldrb r5, [r0]
orr r4, r4, r6, lsl #byte(2) orr r4, r4, r6, put_byte_2
ldrb r6, [r0] ldrb r6, [r0]
orr r4, r4, ip, lsl #byte(3) orr r4, r4, ip, put_byte_3
ldrb ip, [r0] ldrb ip, [r0]
mov r5, r5, lsl #byte(0) mov r5, r5, put_byte_0
ldrb lr, [r0] ldrb lr, [r0]
orr r5, r5, r6, lsl #byte(1) orr r5, r5, r6, put_byte_1
ldrb r6, [r0] ldrb r6, [r0]
orr r5, r5, ip, lsl #byte(2) orr r5, r5, ip, put_byte_2
ldrb ip, [r0] ldrb ip, [r0]
orr r5, r5, lr, lsl #byte(3) orr r5, r5, lr, put_byte_3
ldrb lr, [r0] ldrb lr, [r0]
mov r6, r6, lsl #byte(0) mov r6, r6, put_byte_0
orr r6, r6, ip, lsl #byte(1) orr r6, r6, ip, put_byte_1
ldrb ip, [r0] ldrb ip, [r0]
orr r6, r6, lr, lsl #byte(2) orr r6, r6, lr, put_byte_2
orr r6, r6, ip, lsl #byte(3) orr r6, r6, ip, put_byte_3
stmia r1!, {r3 - r6} stmia r1!, {r3 - r6}
subs r2, r2, #16 subs r2, r2, #16
...@@ -80,19 +80,19 @@ ENTRY(__raw_readsb) ...@@ -80,19 +80,19 @@ ENTRY(__raw_readsb)
ldrb r3, [r0] ldrb r3, [r0]
ldrb r4, [r0] ldrb r4, [r0]
ldrb r5, [r0] ldrb r5, [r0]
mov r3, r3, lsl #byte(0) mov r3, r3, put_byte_0
ldrb r6, [r0] ldrb r6, [r0]
orr r3, r3, r4, lsl #byte(1) orr r3, r3, r4, put_byte_1
ldrb r4, [r0] ldrb r4, [r0]
orr r3, r3, r5, lsl #byte(2) orr r3, r3, r5, put_byte_2
ldrb r5, [r0] ldrb r5, [r0]
orr r3, r3, r6, lsl #byte(3) orr r3, r3, r6, put_byte_3
ldrb r6, [r0] ldrb r6, [r0]
mov r4, r4, lsl #byte(0) mov r4, r4, put_byte_0
ldrb ip, [r0] ldrb ip, [r0]
orr r4, r4, r5, lsl #byte(1) orr r4, r4, r5, put_byte_1
orr r4, r4, r6, lsl #byte(2) orr r4, r4, r6, put_byte_2
orr r4, r4, ip, lsl #byte(3) orr r4, r4, ip, put_byte_3
stmia r1!, {r3, r4} stmia r1!, {r3, r4}
.insb_no_8: tst r2, #4 .insb_no_8: tst r2, #4
...@@ -102,10 +102,10 @@ ENTRY(__raw_readsb) ...@@ -102,10 +102,10 @@ ENTRY(__raw_readsb)
ldrb r4, [r0] ldrb r4, [r0]
ldrb r5, [r0] ldrb r5, [r0]
ldrb r6, [r0] ldrb r6, [r0]
mov r3, r3, lsl #byte(0) mov r3, r3, put_byte_0
orr r3, r3, r4, lsl #byte(1) orr r3, r3, r4, put_byte_1
orr r3, r3, r5, lsl #byte(2) orr r3, r3, r5, put_byte_2
orr r3, r3, r6, lsl #byte(3) orr r3, r3, r6, put_byte_3
str r3, [r1], #4 str r3, [r1], #4
.insb_no_4: ands r2, r2, #3 .insb_no_4: ands r2, r2, #3
......
...@@ -183,14 +183,14 @@ USER( strt r3, [r0], #4) @ May fault ...@@ -183,14 +183,14 @@ USER( strt r3, [r0], #4) @ May fault
strnet r3, [r0], #4 @ Shouldnt fault strnet r3, [r0], #4 @ Shouldnt fault
ands ip, ip, #3 ands ip, ip, #3
beq .c2u_1fupi beq .c2u_1fupi
.c2u_1nowords: mov r3, r7, lsr #byte(1) .c2u_1nowords: mov r3, r7, get_byte_1
teq ip, #0 teq ip, #0
beq .c2u_finished beq .c2u_finished
cmp ip, #2 cmp ip, #2
USER( strbt r3, [r0], #1) @ May fault USER( strbt r3, [r0], #1) @ May fault
movge r3, r7, lsr #byte(2) movge r3, r7, get_byte_2
USER( strgebt r3, [r0], #1) @ May fault USER( strgebt r3, [r0], #1) @ May fault
movgt r3, r7, lsr #byte(3) movgt r3, r7, get_byte_3
USER( strgtbt r3, [r0], #1) @ May fault USER( strgtbt r3, [r0], #1) @ May fault
b .c2u_finished b .c2u_finished
...@@ -250,12 +250,12 @@ USER( strt r3, [r0], #4) @ May fault ...@@ -250,12 +250,12 @@ USER( strt r3, [r0], #4) @ May fault
strnet r3, [r0], #4 @ Shouldnt fault strnet r3, [r0], #4 @ Shouldnt fault
ands ip, ip, #3 ands ip, ip, #3
beq .c2u_2fupi beq .c2u_2fupi
.c2u_2nowords: mov r3, r7, lsr #byte(2) .c2u_2nowords: mov r3, r7, get_byte_2
teq ip, #0 teq ip, #0
beq .c2u_finished beq .c2u_finished
cmp ip, #2 cmp ip, #2
USER( strbt r3, [r0], #1) @ May fault USER( strbt r3, [r0], #1) @ May fault
movge r3, r7, lsr #byte(3) movge r3, r7, get_byte_3
USER( strgebt r3, [r0], #1) @ May fault USER( strgebt r3, [r0], #1) @ May fault
ldrgtb r3, [r1], #0 ldrgtb r3, [r1], #0
USER( strgtbt r3, [r0], #1) @ May fault USER( strgtbt r3, [r0], #1) @ May fault
...@@ -317,7 +317,7 @@ USER( strt r3, [r0], #4) @ May fault ...@@ -317,7 +317,7 @@ USER( strt r3, [r0], #4) @ May fault
strnet r3, [r0], #4 @ Shouldnt fault strnet r3, [r0], #4 @ Shouldnt fault
ands ip, ip, #3 ands ip, ip, #3
beq .c2u_3fupi beq .c2u_3fupi
.c2u_3nowords: mov r3, r7, lsr #byte(3) .c2u_3nowords: mov r3, r7, get_byte_3
teq ip, #0 teq ip, #0
beq .c2u_finished beq .c2u_finished
cmp ip, #2 cmp ip, #2
...@@ -496,14 +496,14 @@ USER( ldrnet r7, [r1], #4) @ May fault ...@@ -496,14 +496,14 @@ USER( ldrnet r7, [r1], #4) @ May fault
strne r3, [r0], #4 strne r3, [r0], #4
ands ip, ip, #3 ands ip, ip, #3
beq .cfu_1fupi beq .cfu_1fupi
.cfu_1nowords: mov r3, r7, lsr #byte(1) .cfu_1nowords: mov r3, r7, get_byte_1
teq ip, #0 teq ip, #0
beq .cfu_finished beq .cfu_finished
cmp ip, #2 cmp ip, #2
strb r3, [r0], #1 strb r3, [r0], #1
movge r3, r7, lsr #byte(2) movge r3, r7, get_byte_2
strgeb r3, [r0], #1 strgeb r3, [r0], #1
movgt r3, r7, lsr #byte(3) movgt r3, r7, get_byte_3
strgtb r3, [r0], #1 strgtb r3, [r0], #1
b .cfu_finished b .cfu_finished
...@@ -563,12 +563,12 @@ USER( ldrnet r7, [r1], #4) @ May fault ...@@ -563,12 +563,12 @@ USER( ldrnet r7, [r1], #4) @ May fault
strne r3, [r0], #4 strne r3, [r0], #4
ands ip, ip, #3 ands ip, ip, #3
beq .cfu_2fupi beq .cfu_2fupi
.cfu_2nowords: mov r3, r7, lsr #byte(2) .cfu_2nowords: mov r3, r7, get_byte_2
teq ip, #0 teq ip, #0
beq .cfu_finished beq .cfu_finished
cmp ip, #2 cmp ip, #2
strb r3, [r0], #1 strb r3, [r0], #1
movge r3, r7, lsr #byte(3) movge r3, r7, get_byte_3
strgeb r3, [r0], #1 strgeb r3, [r0], #1
USER( ldrgtbt r3, [r1], #0) @ May fault USER( ldrgtbt r3, [r1], #0) @ May fault
strgtb r3, [r0], #1 strgtb r3, [r0], #1
...@@ -630,7 +630,7 @@ USER( ldrnet r7, [r1], #4) @ May fault ...@@ -630,7 +630,7 @@ USER( ldrnet r7, [r1], #4) @ May fault
strne r3, [r0], #4 strne r3, [r0], #4
ands ip, ip, #3 ands ip, ip, #3
beq .cfu_3fupi beq .cfu_3fupi
.cfu_3nowords: mov r3, r7, lsr #byte(3) .cfu_3nowords: mov r3, r7, get_byte_3
teq ip, #0 teq ip, #0
beq .cfu_finished beq .cfu_finished
cmp ip, #2 cmp ip, #2
......
...@@ -25,11 +25,25 @@ ...@@ -25,11 +25,25 @@
#ifndef __ARMEB__ #ifndef __ARMEB__
#define pull lsr #define pull lsr
#define push lsl #define push lsl
#define byte(x) (x*8) #define get_byte_0 lsl #0
#define get_byte_1 lsr #8
#define get_byte_2 lsr #16
#define get_byte_3 lsr #24
#define put_byte_0 lsl #0
#define put_byte_1 lsl #8
#define put_byte_2 lsl #16
#define put_byte_3 lsl #24
#else #else
#define pull lsl #define pull lsl
#define push lsr #define push lsr
#define byte(x) ((3-x)*8) #define get_byte_0 lsr #24
#define get_byte_1 lsr #16
#define get_byte_2 lsr #8
#define get_byte_3 lsl #0
#define put_byte_0 lsl #24
#define put_byte_1 lsl #16
#define put_byte_2 lsl #8
#define put_byte_3 lsl #0
#endif #endif
/* /*
......
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